Skip to content

Commit

Permalink
fix(install) preposition info, Fix spmjs/spm#1107
Browse files Browse the repository at this point in the history
  • Loading branch information
sorrycc committed Dec 23, 2014
1 parent 1ed5c3a commit e695bfb
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions lib/install.js
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,9 @@ function* installPackage(id, args, saveDeps) {
log.info('install', color.magenta(pkgId));
debug('start install package %s', pkgId);

var pinfo = yield* info(idObj, args);
pkgId = pinfo.name + '@' + pinfo.version;

// The package has downloaded in dest
// always false when version is not empty
if (existInDest(idObj, args)) return;
Expand All @@ -94,9 +97,6 @@ function* installPackage(id, args, saveDeps) {
debug('package %s has been in downloadlist', pkgId);
return;
}

var pinfo = yield* info(idObj, args);
pkgId = pinfo.name + '@' + pinfo.version;
args.downloadlist[pkgId] = pinfo;

// save dependencies to package.json
Expand Down

0 comments on commit e695bfb

Please sign in to comment.