Skip to content

Commit ddcd2da

Browse files
committed
refactor: switch to shell.cmd()
This swaps out shell.exec() in favor of shell.cmd(). This should offer more reliable performance and consistent behavior. There's a known issue that this causes one test case to fail due to a change in behavior for globbing.
1 parent efe104a commit ddcd2da

1 file changed

Lines changed: 2 additions & 3 deletions

File tree

index.js

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,9 @@ const proxyifyCmd = (t, ...cmdStart) => {
66
t = t || function _t(...args) {
77
// Wrap all the arguments in quotes
88
const newArgs = cmdStart
9-
.concat(args)
10-
.map((x) => JSON.stringify(x));
9+
.concat(args);
1110
// Run this command in the shell
12-
return origShell.exec.call(this.stdout, newArgs.join(' '));
11+
return origShell.cmd(...newArgs);
1312
};
1413
// Store the list of commands, in case we have a subcommand chain
1514
t[cmdArrayAttr] = cmdStart;

0 commit comments

Comments
 (0)