mirror of
https://github.com/pnpm/pnpm.git
synced 2025-12-25 16:18:06 -05:00
fix: print more details when a bin file cannot be created (#6801)
This commit is contained in:
6
.changeset/rare-cycles-kick.md
Normal file
6
.changeset/rare-cycles-kick.md
Normal file
@@ -0,0 +1,6 @@
|
||||
---
|
||||
"@pnpm/link-bins": patch
|
||||
"pnpm": patch
|
||||
---
|
||||
|
||||
When a command cannot be created in `.bin`, print the exact error message that happened.
|
||||
@@ -217,7 +217,7 @@ async function linkBin (cmd: CommandInfo, binsDir: string, opts?: LinkBinOptions
|
||||
if (err.code !== 'ENOENT') {
|
||||
throw err
|
||||
}
|
||||
globalWarn(`Failed to create bin at ${externalBinPath}. The source file at ${cmd.path} does not exist.`)
|
||||
globalWarn(`Failed to create bin at ${externalBinPath}. ${err.message as string}`)
|
||||
}
|
||||
return
|
||||
}
|
||||
@@ -241,7 +241,7 @@ async function linkBin (cmd: CommandInfo, binsDir: string, opts?: LinkBinOptions
|
||||
if (err.code !== 'ENOENT') {
|
||||
throw err
|
||||
}
|
||||
globalWarn(`Failed to create bin at ${externalBinPath}. The source file at ${cmd.path} does not exist.`)
|
||||
globalWarn(`Failed to create bin at ${externalBinPath}. ${err.message as string}`)
|
||||
return
|
||||
}
|
||||
// ensure that bin are executable and not containing
|
||||
|
||||
Reference in New Issue
Block a user