Commit 59ff0b59 authored by Max Stoiber's avatar Max Stoiber Committed by Christopher Chedeau
Browse files

Fix --version (#152)

parent f2c12750
No related merge requests found
Showing with 4 additions and 5 deletions
+4 -5
......@@ -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) {
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment