Skip to content

Commit 6cccb96

Browse files
committed
fix: update remaining run() calls to use execFileSync signature
The Copilot autofix changed run() from execSync(string) to execFileSync(cmd, args[]), but only updated the git calls. The 6 npm calls still used the old signature and would fail at runtime.
1 parent b9f92a1 commit 6cccb96

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

scripts/bundle.mjs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -107,16 +107,16 @@ function restoreVersion({ pkgJsonPath, originalVersion }) {
107107
const cdkPath = resolveCdkPath();
108108

109109
log('Installing CDK constructs dependencies...');
110-
run('npm install', { cwd: cdkPath });
110+
run('npm', ['install'], { cwd: cdkPath });
111111

112112
log('Building CDK constructs...');
113-
run('npm run build', { cwd: cdkPath });
113+
run('npm', ['run', 'build'], { cwd: cdkPath });
114114

115115
// Step 2: Bump CDK version and pack into a tarball
116116
const cdkVersionInfo = bumpVersion(cdkPath);
117117
try {
118118
log('Packing CDK constructs...');
119-
run('npm pack', { cwd: cdkPath });
119+
run('npm', ['pack'], { cwd: cdkPath });
120120
} finally {
121121
restoreVersion(cdkVersionInfo);
122122
}
@@ -131,10 +131,10 @@ if (!fs.existsSync(cdkTarballSrc)) {
131131

132132
// Step 3: Build CLI normally (no modifications to copy-assets)
133133
log('Installing CLI dependencies...');
134-
run('npm install', { cwd: cliRoot });
134+
run('npm', ['install'], { cwd: cliRoot });
135135

136136
log('Building CLI...');
137-
run('npm run build', { cwd: cliRoot });
137+
run('npm', ['run', 'build'], { cwd: cliRoot });
138138

139139
// Step 4: Copy CDK tarball into dist/assets/ so CDKRenderer can detect it
140140
const bundledTarballDest = path.join(cliRoot, 'dist', 'assets', 'bundled-agentcore-cdk.tgz');
@@ -145,7 +145,7 @@ log(`Placed CDK tarball at ${bundledTarballDest}`);
145145
const cliVersionInfo = bumpVersion(cliRoot);
146146
try {
147147
log('Packing CLI tarball...');
148-
run('npm pack', { cwd: cliRoot });
148+
run('npm', ['pack'], { cwd: cliRoot });
149149
} finally {
150150
restoreVersion(cliVersionInfo);
151151
}

0 commit comments

Comments
 (0)