Add -v flag to print the version

This commit is contained in:
Kevin Sawicki
2013-06-11 16:23:47 -07:00
parent a98308a7a4
commit 7390d908bd

View File

@@ -62,9 +62,15 @@ parseCommandLine = ->
options.alias('n', 'new-window').boolean('n').describe('n', 'Open a new window.')
options.alias('t', 'test').boolean('t').describe('t', 'Run the Atom specs and exit with error code on failures.')
options.alias('w', 'wait').boolean('w').describe('w', 'Wait for window to be closed before returning.')
options.alias('v', 'version').boolean('v').describe('v', 'Print the version.')
args = options.argv
if args.h
options.showHelp()
process.stdout.write(options.help())
process.exit(0)
if args.v
process.stdout.write("#{version}\n")
process.exit(0)
executedFrom = args['executed-from']