mirror of
https://github.com/pnpm/pnpm.git
synced 2026-04-10 18:18:56 -04:00
fix: don't print a warning when printing packages globally (#8529)
close #4761
This commit is contained in:
6
.changeset/shaggy-tools-jog.md
Normal file
6
.changeset/shaggy-tools-jog.md
Normal file
@@ -0,0 +1,6 @@
|
||||
---
|
||||
"@pnpm/core": patch
|
||||
"pnpm": patch
|
||||
---
|
||||
|
||||
Don't print a warning when linking packages globally [#4761](https://github.com/pnpm/pnpm/issues/4761).
|
||||
@@ -1333,8 +1333,10 @@ const _installInContext: InstallFunction = async (projects, ctx, opts) => {
|
||||
const projectToInstall = projects[index]
|
||||
if (opts.global && projectToInstall.mutation.includes('install')) {
|
||||
projectToInstall.wantedDependencies.forEach(pkg => {
|
||||
if (!linkedPackages?.includes(pkg.alias)) {
|
||||
logger.warn({ message: `${pkg.alias ?? pkg.pref} has no binaries`, prefix: opts.lockfileDir })
|
||||
// This warning is never printed currently during "pnpm link --global"
|
||||
// due to the following issue: https://github.com/pnpm/pnpm/issues/4761
|
||||
if (pkg.alias && !linkedPackages?.includes(pkg.alias)) {
|
||||
logger.warn({ message: `${pkg.alias} has no binaries`, prefix: opts.lockfileDir })
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user