mirror of
https://github.com/atom/atom.git
synced 2026-01-23 05:48:10 -05:00
Add -v flag to print the version
This commit is contained in:
@@ -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']
|
||||
|
||||
Reference in New Issue
Block a user