Skip to content

Commit

Permalink
Fix --version (#152)
Browse files Browse the repository at this point in the history
  • Loading branch information
mxstbr authored and vjeux committed Jul 24, 2016
1 parent f2c1275 commit 59ff0b5
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions global-cli/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -54,17 +54,16 @@ var argv = require('minimist')(process.argv.slice(2));
*/
var commands = argv._;
if (commands.length === 0) {
if (argv.version) {
console.log('create-react-app version: ' + require('./package.json').version);
process.exit();
}
console.error(
'Usage: create-react-app <project-directory> [--verbose]'
);
process.exit(1);
}

if (argv.version) {
console.log('create-react-app version: ' + require('./package.json').version);
process.exit();
}

createApp(commands[0], argv.verbose, argv['scripts-version']);

function createApp(name, verbose, version) {
Expand Down

0 comments on commit 59ff0b5

Please sign in to comment.