libnpmexec
Advanced tools
Comparing version 8.1.3 to 8.1.4
@@ -205,10 +205,15 @@ 'use strict' | ||
if (needInstall.length > 0 && globalPath) { | ||
// See if the package is installed globally, and run the translated bin | ||
// See if the package is installed globally. If it is, run the translated bin | ||
const globalArb = new Arborist({ ...flatOptions, path: globalPath, global: true }) | ||
const globalTree = await globalArb.loadActual() | ||
const { manifest: globalManifest } = | ||
await missingFromTree({ spec, tree: globalTree, flatOptions, shallow: true }) | ||
if (!globalManifest && await fileExists(`${globalBin}/${args[0]}`)) { | ||
binPaths.push(globalBin) | ||
return await run() | ||
const globalTree = await globalArb.loadActual().catch(() => { | ||
log.verbose(`Could not read global path ${globalPath}, ignoring`) | ||
return null | ||
}) | ||
if (globalTree) { | ||
const { manifest: globalManifest } = | ||
await missingFromTree({ spec, tree: globalTree, flatOptions, shallow: true }) | ||
if (!globalManifest && await fileExists(`${globalBin}/${args[0]}`)) { | ||
binPaths.push(globalBin) | ||
return await run() | ||
} | ||
} | ||
@@ -215,0 +220,0 @@ } |
{ | ||
"name": "libnpmexec", | ||
"version": "8.1.3", | ||
"version": "8.1.4", | ||
"files": [ | ||
@@ -36,3 +36,3 @@ "bin/", | ||
"scripts": { | ||
"lint": "eslint \"**/*.{js,cjs,ts,mjs,jsx,tsx}\"", | ||
"lint": "npm run eslint", | ||
"posttest": "npm run lint", | ||
@@ -42,4 +42,5 @@ "test": "tap", | ||
"postlint": "template-oss-check", | ||
"lintfix": "npm run lint -- --fix", | ||
"template-oss-apply": "template-oss-apply --force" | ||
"lintfix": "npm run eslint -- --fix", | ||
"template-oss-apply": "template-oss-apply --force", | ||
"eslint": "eslint \"**/*.{js,cjs,ts,mjs,jsx,tsx}\"" | ||
}, | ||
@@ -56,3 +57,3 @@ "tap": { | ||
"@npmcli/mock-registry": "^1.0.0", | ||
"@npmcli/template-oss": "4.22.0", | ||
"@npmcli/template-oss": "4.23.3", | ||
"bin-links": "^4.0.4", | ||
@@ -78,5 +79,5 @@ "chalk": "^5.2.0", | ||
"//@npmcli/template-oss": "This file is partially managed by @npmcli/template-oss. Edits may be overwritten.", | ||
"version": "4.22.0", | ||
"version": "4.23.3", | ||
"content": "../../scripts/template-oss/index.js" | ||
} | ||
} |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
17704
380