Skip to content

Commit

Permalink
test: use shell option directly like @npm/run-script
Browse files Browse the repository at this point in the history
  • Loading branch information
gluxon committed Apr 15, 2024
1 parent db7aee8 commit 796f251
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 3 deletions.
15 changes: 15 additions & 0 deletions __patches__/@[email protected]
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
diff --git a/index.js b/index.js
index 931c9170414e3161a86ea6661727e0822d144f2e..59fad26304099619ed8303fd1348b9136959c150 100644
--- a/index.js
+++ b/index.js
@@ -273,7 +273,9 @@ function runCmd_ (cmd, pkg, env, wd, opts, stage, unsafe, uid, gid, cb_) {
return
}

- const proc = spawn(sh, [shFlag, cmd], conf, opts.log)
+ const proc = customShell
+ ? spawn(cmd, { ...conf, shell: customShell }, opts.log)
+ : spawn(sh, [shFlag, cmd], conf, opts.log)

proc.on('error', procError)
proc.on('close', (code, signal) => {
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,8 @@
"onlyBuiltDependencies": [],
"patchedDependencies": {
"[email protected]": "__patches__/pkg.patch",
"[email protected]": "__patches__/[email protected]"
"[email protected]": "__patches__/[email protected]",
"@pnpm/[email protected]": "__patches__/@[email protected]"
},
"updateConfig": {
"ignoreDependencies": [
Expand Down
7 changes: 5 additions & 2 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 796f251

Please sign in to comment.