Skip to content

Commit f34713d

Browse files
Fixing merge conflict from security bot fix.
2 parents eea5471 + 8a3ed92 commit f34713d

File tree

1 file changed

+16
-16
lines changed

1 file changed

+16
-16
lines changed

scripts/buildScripts.js

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
const fs = require('fs');
2-
const path = require('path');
3-
const { execSync } = require('child_process');
1+
const fs = require("fs");
2+
const path = require("path");
3+
const { execSync, execFileSync } = require("child_process");
44

55
// Configuration file path
66
const CONFIG_FILE = path.join(__dirname, 'build-config.json');
@@ -51,19 +51,19 @@ function runBuildScripts() {
5151

5252
console.log(`▶️ Running: ${scriptPath}`);
5353

54-
try {
55-
if (scriptPath.endsWith('.ts')) {
56-
// For TypeScript files, use ts-node
57-
execSync(`npx ts-node ${fullPath}`, { stdio: 'inherit' });
58-
} else {
59-
// For JavaScript files, use node
60-
execSync(`node ${fullPath}`, { stdio: 'inherit' });
61-
}
62-
console.log(`✅ Completed: ${scriptPath}`);
63-
} catch (error) {
64-
console.error(`❌ Error running ${scriptPath}:`, error.message);
65-
}
66-
});
54+
try {
55+
if (scriptPath.endsWith(".ts")) {
56+
// For TypeScript files, use ts-node
57+
execFileSync("npx", ["ts-node", fullPath], { stdio: "inherit" });
58+
} else {
59+
// For JavaScript files, use node
60+
execFileSync("node", [fullPath], { stdio: "inherit" });
61+
}
62+
console.log(`✅ Completed: ${scriptPath}`);
63+
} catch (error) {
64+
console.error(`❌ Error running ${scriptPath}:`, error.message);
65+
}
66+
});
6767

6868
console.log('✨ Build scripts completed');
6969
}

0 commit comments

Comments
 (0)