Skip to content

Commit

Permalink
Warn when using globally installed npm package
Browse files Browse the repository at this point in the history
Followup to #74
When we roll out the feature of searching for a locally installed ibazel, we need to communicate it to users,
or they are not likely to discover it.
Especially while ibazel is under active development, development workflows like browser livereload are
sensitive to the ibazel version so I want to be sure users are not likely to trip on versioning.
  • Loading branch information
alexeagle authored and achew22 committed Dec 5, 2017
1 parent 557ba60 commit 28fc06d
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions npm/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,12 @@ function main(args) {
break;
}
}
if (basePath === __dirname) {
console.error(`WARNING: no ibazel version found in your node_modules.
We recommend installing a devDependency on ibazel so you use the same
version as other engineers on this project.
Using the globally installed version at ${__dirname}`);
}

const binary = path.join(basePath, 'bin', `${platform}_${arch}`, 'ibazel');
const ibazel = spawn(binary, args, {stdio: 'inherit'});
Expand Down

0 comments on commit 28fc06d

Please sign in to comment.