From 02eb7466a7a5aeb6d83c0e87210aefa80cc4e767 Mon Sep 17 00:00:00 2001 From: Bill Ticehurst Date: Thu, 5 Mar 2015 23:32:54 -0800 Subject: [PATCH] Fix watch to honor tsconfig.json setting --- src/compiler/tsc.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/compiler/tsc.ts b/src/compiler/tsc.ts index 57c2298d3d389..c4422e12bf64f 100644 --- a/src/compiler/tsc.ts +++ b/src/compiler/tsc.ts @@ -250,7 +250,7 @@ module ts { var compileResult = compile(rootFileNames, compilerOptions, compilerHost); - if (!commandLine.options.watch) { + if (!compilerOptions.watch) { return sys.exit(compileResult.exitStatus); } @@ -269,7 +269,7 @@ module ts { } // Use default host function var sourceFile = hostGetSourceFile(fileName, languageVersion, onError); - if (sourceFile && commandLine.options.watch) { + if (sourceFile && compilerOptions.watch) { // Attach a file watcher sourceFile.fileWatcher = sys.watchFile(sourceFile.fileName, () => sourceFileChanged(sourceFile)); }