From c171c79464667e3c3c1bbbcff2e808a45fa7cb7c Mon Sep 17 00:00:00 2001 From: Daniel Rosenwasser Date: Tue, 29 Jul 2014 16:36:47 -0700 Subject: [PATCH] Moved error checking for command line options around. --- src/compiler/tc.ts | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/compiler/tc.ts b/src/compiler/tc.ts index f81bce68e1a..b363ab4d39f 100644 --- a/src/compiler/tc.ts +++ b/src/compiler/tc.ts @@ -189,11 +189,6 @@ module ts { cmds.errors.push(createCompilerDiagnostic(Diagnostics.No_input_files_specified)); } - if (cmds.errors.length) { - reportDiagnostics(cmds.errors); - return 1; - } - if (cmds.options.version) { reportDiagnostic(createCompilerDiagnostic(Diagnostics.Version_0, version)); return 0; @@ -203,6 +198,11 @@ module ts { // TODO (drosen): Usage. } + if (cmds.errors.length) { + reportDiagnostics(cmds.errors); + return 1; + } + var parseStart = new Date().getTime(); var program = createProgram(cmds.filenames, cmds.options, createCompilerHost(cmds.options)); var bindStart = new Date().getTime();