Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/npm/cli.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/lib/ls.js
diff options
context:
space:
mode:
authorRuy Adorno <ruyadorno@hotmail.com>2021-01-15 23:14:24 +0300
committerRuy Adorno <ruyadorno@hotmail.com>2021-01-15 23:47:25 +0300
commit358e223f208774f9f3bfd7ac50785598ac998ea2 (patch)
tree0579212baaffd2b596e6d25b88c59513f7dbad24 /lib/ls.js
parentd6456c8ebb6d7a832d508eadc100094b547fa36c (diff)
fix: npm ls global tests
Diffstat (limited to 'lib/ls.js')
-rw-r--r--lib/ls.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/ls.js b/lib/ls.js
index 362dacad3..153759d83 100644
--- a/lib/ls.js
+++ b/lib/ls.js
@@ -99,7 +99,7 @@ const getHumanOutputItem = (node, { args, color, global, long }) => {
// special formatting for top-level package name
if (node.isRoot) {
const hasNoPackageJson = !Object.keys(node.package).length
- if (hasNoPackageJson)
+ if (hasNoPackageJson || global)
printable = path
else
printable += `${long ? EOL : ' '}${path}`