mirror of
https://github.com/pnpm/pnpm.git
synced 2026-03-30 04:52:04 -04:00
5
.changeset/spicy-singers-march.md
Normal file
5
.changeset/spicy-singers-march.md
Normal file
@@ -0,0 +1,5 @@
|
||||
---
|
||||
"@pnpm/prepare-package": patch
|
||||
---
|
||||
|
||||
Always return an error message when the preparation of a package fails.
|
||||
@@ -12,7 +12,7 @@ export default async function preparePackage (pkgDir: string) {
|
||||
try {
|
||||
await execa(pm, ['install'], { cwd: pkgDir })
|
||||
} catch (err: any) { // eslint-disable-line
|
||||
throw new PnpmError('PREPARE_PKG_FAILURE', `${err.shortMessage}`) // eslint-disable-line
|
||||
throw new PnpmError('PREPARE_PKG_FAILURE', err.shortMessage ?? err.message)
|
||||
}
|
||||
await rimraf(path.join(pkgDir, 'node_modules'))
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user