Skip to content

Commit

Permalink
fix: windows options
Browse files Browse the repository at this point in the history
  • Loading branch information
mdonnalley committed Sep 28, 2022
1 parent 8ce6001 commit 6fb9bf1
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/execCmd.ts
Original file line number Diff line number Diff line change
Expand Up @@ -382,7 +382,11 @@ export async function execInteractiveCmd(
return new Promise((resolve, reject) => {
const bin = buildCmd('').trim();
const startTime = process.hrtime();
const child = spawn(bin, command.split(' '), { cwd: process.cwd(), ...options });
const opts =
process.platform === 'win32'
? { shell: true, cwd: process.cwd(), ...options }
: { cwd: process.cwd(), ...options };
const child = spawn(bin, command.split(' '), opts);
child.stdin.setDefaultEncoding('utf-8');

const seen = new Set<string>();
Expand Down

0 comments on commit 6fb9bf1

Please sign in to comment.