From 99e3a49543617cd711ff9588ae9e25391e81216f Mon Sep 17 00:00:00 2001 From: ido Date: Sun, 7 Dec 2014 17:40:25 +0200 Subject: [PATCH] fix format issue --- src/cli.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/cli.js b/src/cli.js index 0d6d83f..72bb9e6 100755 --- a/src/cli.js +++ b/src/cli.js @@ -16,6 +16,8 @@ var options = require('./options'); function executeOptions(currentOptions) { var ret = 0; var files = currentOptions._; + context.options.format = currentOptions.format || 'stylish'; + if (currentOptions.version) { console.log('v' + pkg.version); } else if (currentOptions.help) { @@ -27,7 +29,6 @@ function executeOptions(currentOptions) { } else if (!files.length) { console.log(options.generateHelp()); } else { - context.options.format = currentOptions.format; _.forEach(files, handleSingleFile.bind(this, currentOptions)); ret = shell.printResults(context); }