mirror of
https://github.com/pnpm/pnpm.git
synced 2025-12-24 07:38:12 -05:00
fix: don't fail with scriptShell set to false (#10023)
close #8748 --------- Co-authored-by: Zoltan Kochan <z@kochan.io>
This commit is contained in:
committed by
GitHub
parent
0e58f873d9
commit
a514bc0997
6
.changeset/lucky-sheep-love.md
Normal file
6
.changeset/lucky-sheep-love.md
Normal file
@@ -0,0 +1,6 @@
|
||||
---
|
||||
"@pnpm/lifecycle": patch
|
||||
"pnpm": patch
|
||||
---
|
||||
|
||||
Don't fail with a meaningless error when `scriptShell` is set to `false` [#8748](https://github.com/pnpm/pnpm/issues/8748).
|
||||
@@ -59,7 +59,7 @@ export async function runLifecycleHook (
|
||||
//
|
||||
// Note that npm (as of version 10.5.0) doesn't support setting script-shell
|
||||
// to a .bat or .cmd file either.
|
||||
if (opts.scriptShell != null && isWindowsBatchFile(opts.scriptShell)) {
|
||||
if (opts.scriptShell != null && typeof opts.scriptShell === 'string' && isWindowsBatchFile(opts.scriptShell)) {
|
||||
throw new PnpmError('ERR_PNPM_INVALID_SCRIPT_SHELL_WINDOWS', 'Cannot spawn .bat or .cmd as a script shell.', {
|
||||
hint: `\
|
||||
The pnpm-workspace.yaml scriptShell option was configured to a .bat or .cmd file. These cannot be used as a script shell reliably.
|
||||
|
||||
Reference in New Issue
Block a user