Skip to content

Commit

Permalink
Fix EINVAL error while running spawning .bat binaries on Windows.
Browse files Browse the repository at this point in the history
  • Loading branch information
garg3133 committed Dec 6, 2024
1 parent 7aef1a2 commit 004ff78
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/commands/android/utils/sdk.ts
Original file line number Diff line number Diff line change
Expand Up @@ -233,7 +233,10 @@ export const spawnCommandSync = (binaryLocation: string, binaryName: string, pla
cmd = binaryLocation;
}

const result = spawnSync(cmd, args, {stdio: 'inherit'});
const result = spawnSync(cmd, args, {
stdio: 'inherit',
...(platform === 'windows' && cmd.endsWith('.bat') && {shell: true})
});

if (result.error) {
console.error(result.error);
Expand Down

0 comments on commit 004ff78

Please sign in to comment.