From be595a62b7302ea45ba4e9294476246da5813b6d Mon Sep 17 00:00:00 2001 From: Kevin Sawicki Date: Tue, 28 May 2013 17:56:07 -0700 Subject: [PATCH] Add version to usage message --- src/main.coffee | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/main.coffee b/src/main.coffee index 871da9156..daad4264a 100644 --- a/src/main.coffee +++ b/src/main.coffee @@ -16,8 +16,11 @@ getHomeDir = -> process.env[if process.platform is 'win32' then 'USERPROFILE' else 'HOME'] parseCommandLine = -> + version = fs.readFileSync(path.join(__dirname, '..', '..', 'version'), 'utf8') + options = optimist(process.argv[1..]) options.usage """ + Atom #{version} Usage: atom [options] [file ..] """ @@ -33,7 +36,6 @@ parseCommandLine = -> testMode = true if args['test'] wait = true if args['wait'] pid = args['pid'] - version = String fs.readFileSync(path.join(__dirname, '..', '..', 'version')) if args['resource-path'] resourcePath = args['resource-path']