Skip to content

Commit

Permalink
Fixes yarnpkg#1306. Using a dist-tag during install will supply a spe…
Browse files Browse the repository at this point in the history
…cific

version number in package.json.
  • Loading branch information
aethant committed Dec 9, 2016
1 parent 824f122 commit 0dabed7
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion __tests__/fixtures/request-cache/GET/localhost/.bin
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
HTTP/1.1 200 OK
Date: Mon, 24 Oct 2016 13:03:20 GMT
Date: Fri, 09 Dec 2016 08:59:21 GMT
Connection: close
Content-Length: 2

Expand Down
2 changes: 1 addition & 1 deletion src/cli/commands/add.js
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ export class Add extends Install {
let version;
if (parts.hasVersion && parts.range) {
// if the user specified a range then use it verbatim
version = parts.range;
version = pkg.version;
} else if (PackageRequest.getExoticResolver(pattern)) {
// wasn't a name/range tuple so this is just a raw exotic pattern
version = pattern;
Expand Down

0 comments on commit 0dabed7

Please sign in to comment.