Skip to content

Commit

Permalink
Add version and help cli switches
Browse files Browse the repository at this point in the history
  • Loading branch information
alxndrsn committed Jun 1, 2017
1 parent 932572a commit 34ca4c3
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions bin/medic-conf
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,14 @@ const usage = require('../src/cli/usage');
const supportedActions = require('../src/cli/supported-actions');

const args = process.argv.slice(2);
if(args.length === 1) {
switch(args[0]) {
case '--help': usage(); process.exit(0);
case '--version':
console.log(require('../package.json').version);
process.exit(0);
}
}
if(args.length < 2) {
usage();
process.exit(1);
Expand Down

0 comments on commit 34ca4c3

Please sign in to comment.