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)); }