From f2a8842215de65d7042b4bb6d483728fb19c051d Mon Sep 17 00:00:00 2001 From: Daniel Rosenwasser Date: Thu, 31 Jul 2014 21:43:08 -0700 Subject: [PATCH] Addressed code review feedback. --- src/compiler/tc.ts | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/src/compiler/tc.ts b/src/compiler/tc.ts index fa922138d17..fc508ed459c 100644 --- a/src/compiler/tc.ts +++ b/src/compiler/tc.ts @@ -185,17 +185,18 @@ module ts { validateLocaleAndSetLanguage(commandLine.options.locale, commandLine.errors); } - if (commandLine.filenames.length === 0 && !(commandLine.options.help || commandLine.options.version)) { - commandLine.errors.push(createCompilerDiagnostic(Diagnostics.No_input_files_specified)); - } - if (commandLine.options.version) { reportDiagnostic(createCompilerDiagnostic(Diagnostics.Version_0, version)); sys.exit(0); } - if (commandLine.filenames.length === 0 || commandLine.options.help) { + if (commandLine.options.help) { // TODO (drosen): Usage. + sys.exit(0); + } + + if (commandLine.filenames.length === 0) { + commandLine.errors.push(createCompilerDiagnostic(Diagnostics.No_input_files_specified)); } if (commandLine.errors.length) {