Skip to content

Commit

Permalink
fix: avoid parsing arguments on Windows before passing to script-shell
Browse files Browse the repository at this point in the history
  • Loading branch information
gluxon committed Apr 15, 2024
1 parent 823f08c commit 0d236aa
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -253,6 +253,10 @@ function runCmd_ (cmd, pkg, env, wd, opts, stage, unsafe, uid, gid, cb_) {
// behavior on non-Windows platforms.
if (process.platform === 'win32' && customShell && (customShell.endsWith('.bat') || customShell.endsWith('.cmd'))) {
conf.shell = true

// Avoid parsing arguments before passing them to the customShell. The
// custom shell is expected to parse args.
conf.windowsVerbatimArguments = true
}

opts.log.verbose('lifecycle', logid(pkg, stage), 'PATH:', env[PATH])
Expand Down

0 comments on commit 0d236aa

Please sign in to comment.