Skip to content

Commit faa9e7c

Browse files
committed
use shell: true to properly execute the .cmd file on Windows
1 parent ea2d898 commit faa9e7c

File tree

1 file changed

+2
-1
lines changed
  • packages/amplify-codegen-e2e-tests/src/gen2-codegen-tests-base

1 file changed

+2
-1
lines changed

packages/amplify-codegen-e2e-tests/src/gen2-codegen-tests-base/commands.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,8 @@ const getAmpxPath = (cwd: string): string => {
3232
console.log(`DEBUG: Resolved npx path: ${npxPath}`);
3333

3434
// Execute the command to find 'ampx'
35-
const spawnResult = spawnSync(npxPath, ['which', 'ampx'], { cwd, env: process.env, stdio: 'pipe' });
35+
// Use shell: true to properly execute the .cmd file on Windows
36+
const spawnResult = spawnSync(npxPath, ['which', 'ampx'], { cwd, env: process.env, stdio: 'pipe', shell: true });
3637

3738
// Log the entire result of spawnSync for inspection
3839
console.log('DEBUG: spawnSync result:', spawnResult);

0 commit comments

Comments
 (0)