Skip to content

Commit

Permalink
make --version show the same value inside package.json
Browse files Browse the repository at this point in the history
The CLI flag "--version" wasn't showing the right version of the package.

It had a hardcoded version number that needed to be changed along with the
one inside package.json and sometime ago people stopped updating it.

This implementation ensures the "--version" flag always report the same
value inside package.json, without any need for manually updating.
  • Loading branch information
kevinnio committed May 21, 2019
1 parent 9d34fcb commit 78f9bca
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions lib/jasmine-node/cli.js
Original file line number Diff line number Diff line change
Expand Up @@ -175,9 +175,8 @@ if (specFolders.length === 0) {
}

if (autotest) {

var patterns = ['**/*.js'];

if (extensions.indexOf("coffee") !== -1) {
patterns.push('**/*.coffee');
}
Expand Down Expand Up @@ -282,6 +281,7 @@ function help(){
}

function printVersion(){
console.log("1.14.?");
const package = require(__dirname + '/../../package.json')
console.log(package.version);
process.exit(0);
}

0 comments on commit 78f9bca

Please # to comment.