Skip to content

Commit

Permalink
use a more robust cache directory name for non-NPM packages
Browse files Browse the repository at this point in the history
  • Loading branch information
mourner committed Jan 5, 2017
1 parent 6656ee3 commit fc13f24
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -295,11 +295,14 @@ export default class Config {
let uid = pkg.uid;
if (pkg.registry) {
name = `${pkg.registry}-${name}`;
uid = pkg.version || uid;
}

const {hash} = pkg.remote;
if (hash) {

if (pkg.version && (pkg.version !== pkg.uid)) {
uid = `${pkg.version}-${uid}`;

} else if (hash) {
uid += `-${hash}`;
}

Expand Down

0 comments on commit fc13f24

Please sign in to comment.