Skip to content

Commit

Permalink
Update lib/commands/config.js
Browse files Browse the repository at this point in the history
  • Loading branch information
lukekarrys committed May 14, 2024
1 parent 74e34e5 commit 6c362cc
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions lib/commands/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -346,13 +346,13 @@ ${defData}
continue
}

const keys = Object.entries(data).sort(([a], [b]) => localeCompare(a, b))
if (!keys.length) {
const entries = Object.entries(data).sort(([a], [b]) => localeCompare(a, b))
if (!entries.length) {
continue
}

msg.push(`; "${where}" config from ${source}`, '')
for (const [k, v] of keys) {
for (const [k, v] of entries) {
const display = displayVar(k, v)
const src = this.npm.config.find(k)
msg.push(src === where ? display : `; ${display} ; overridden by ${src}`)
Expand Down

0 comments on commit 6c362cc

Please sign in to comment.