Skip to content

Commit f6c244d

Browse files
committed
code change
1 parent 5d94a48 commit f6c244d

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

scripts/update-dependencies.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
const { execSync } = require('child_process');
1+
const { execFileSync } = require('child_process');
22
const path = require('path');
33
const fs = require('fs');
44
const readline = require('readline');
@@ -25,10 +25,10 @@ try {
2525
}
2626

2727
console.log(`---- Building angular-sdk-components at: ${componentsProjectPath} ----`);
28-
execSync(`cd ${componentsProjectPath} && ng build angular-sdk-components`, { stdio: 'inherit' });
28+
execFileSync('ng', ['build', 'angular-sdk-components'], { cwd: componentsProjectPath, stdio: 'inherit' });
2929

3030
console.log(`---- Packing npm package in: ${distDir} ----`);
31-
execSync(`cd ${distDir} && npm pack`, { stdio: 'inherit' });
31+
execFileSync('npm', ['pack'], { cwd: distDir, stdio: 'inherit' });
3232

3333
// Find the generated .tgz file
3434
const tgzFile = fs.readdirSync(distDir).find(file => file.endsWith('.tgz'));
@@ -50,7 +50,7 @@ try {
5050
fs.copyFileSync(tgzPath, targetPath);
5151

5252
console.log('---- Installing package in angular-sdk ----');
53-
execSync(`cd ${angularSdkPath} && npm install ./${tgzFile}`, { stdio: 'inherit' });
53+
execFileSync('npm', ['install', `./${tgzFile}`], { cwd: angularSdkPath, stdio: 'inherit' });
5454
console.log("Done!!! 'angular-sdk' now uses local build of angular-sdk-components.");
5555
});
5656
} catch (error) {

0 commit comments

Comments
 (0)