diff options
author | Rebecca Turner <me@re-becca.org> | 2015-06-15 18:05:15 +0300 |
---|---|---|
committer | Rebecca Turner <me@re-becca.org> | 2015-06-26 03:27:13 +0300 |
commit | 26d013e4c06c377f7935edc5e0ab464994f1bee8 (patch) | |
tree | 1ce6d316e6fb597dffdbb850e2e75e6843c1d4e4 | |
parent | 590387147fb6889ad70abb849ede10c57f83f44f (diff) |
save-prefix: tags should get resolved into versions
-rw-r--r-- | lib/install/save.js | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/lib/install/save.js b/lib/install/save.js index 629a64f52..c15f08909 100644 --- a/lib/install/save.js +++ b/lib/install/save.js @@ -123,9 +123,12 @@ var getSaveType = exports.getSaveType = function (args) { function computeVersionSpec (child) { validate('O', arguments) - var requested = child.package._requested || { - type: 'version', - spec: child.package.version + var requested = child.package._requested + if (!requested || requested.type === 'tag') { + requested = { + type: 'version', + spec: child.package.version + } } if (requested.type === 'vesion' || requested.type === 'range') { var version = child.package.version |