mirror of
https://github.com/pnpm/pnpm.git
synced 2026-01-11 00:18:32 -05:00
fix(exec): exit with the right exit code
This commit is contained in:
5
.changeset/wise-jobs-glow.md
Normal file
5
.changeset/wise-jobs-glow.md
Normal file
@@ -0,0 +1,5 @@
|
||||
---
|
||||
"@pnpm/plugin-commands-script-runners": patch
|
||||
---
|
||||
|
||||
`pnpm exec` should exit with the exit code of the child process and should not print an error.
|
||||
@@ -121,6 +121,9 @@ export async function handler (
|
||||
})
|
||||
result.passes++
|
||||
} catch (err) {
|
||||
if (!opts.recursive && typeof err.exitCode === 'number') {
|
||||
process.exit(err.exitCode)
|
||||
}
|
||||
logger.info(err)
|
||||
|
||||
if (!opts.bail) {
|
||||
|
||||
Reference in New Issue
Block a user