mirror of
https://github.com/Shik3i/KoalaSync.git
synced 2026-08-26 02:27:11 +00:00
fix: make shared file sync fail-fast in build script
This commit is contained in:
@@ -26,9 +26,10 @@ const sharedFiles = ['constants.js', 'blacklist.js'];
|
|||||||
for (const file of sharedFiles) {
|
for (const file of sharedFiles) {
|
||||||
const src = path.join(masterSharedDir, file);
|
const src = path.join(masterSharedDir, file);
|
||||||
const dest = path.join(extSharedDir, file);
|
const dest = path.join(extSharedDir, file);
|
||||||
if (fs.existsSync(src)) {
|
if (!fs.existsSync(src)) {
|
||||||
fs.copyFileSync(src, dest);
|
throw new Error(`CRITICAL: Source shared file missing: ${src}. Aborting build to prevent broken artifacts.`);
|
||||||
}
|
}
|
||||||
|
fs.copyFileSync(src, dest);
|
||||||
}
|
}
|
||||||
console.log('✓ constants.js and blacklist.js synced to extension/shared/');
|
console.log('✓ constants.js and blacklist.js synced to extension/shared/');
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user