Skip to content

Commit d6b134f

Browse files
mjeanroyisaacs
authored andcommitted
fix: fix package spec parsing during cache add process
Close #1734 PR-URL: #1738 Credit: @mjeanroy Close: #1738 Reviewed-by: @isaacs EDIT(@isaacs): Removed test, pending full test coverage of lib/cache.js
1 parent 8e3e83b commit d6b134f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/cache.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ const add = async (args, where) => {
8080
' npm cache add <folder>\n'
8181
log.silly('cache add', 'args', args)
8282
const spec = args[0] +
83-
(args[1] === undefined || args[1] === null ? `@${args[1]}` : '')
83+
(args[1] === undefined || args[1] === null ? '' : `@${args[1]}`)
8484

8585
log.verbose('cache add', 'spec', spec)
8686
if (!spec) {

0 commit comments

Comments
 (0)