Skip to content
This repository was archived by the owner on Jul 29, 2024. It is now read-only.

Commit 9fab249

Browse files
committed
refactor(cli): clean up print version
1 parent 0a6274c commit 9fab249

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

Diff for: lib/cli.js

+1-5
Original file line numberDiff line numberDiff line change
@@ -57,14 +57,10 @@ var argv = require('optimist').
5757
}).
5858
argv;
5959

60-
var printVersion = function () {
60+
if (argv.version) {
6161
util.puts('Version ' + JSON.parse(
6262
fs.readFileSync(__dirname + '/../package.json', 'utf8')).version);
6363
process.exit(0);
64-
};
65-
66-
if (argv.version) {
67-
printVersion();
6864
}
6965

7066
// Any file names should be resolved relative to the current working directory.

0 commit comments

Comments
 (0)