From 9c54e2dee7acf2964214cadaf08f969c06625e89 Mon Sep 17 00:00:00 2001 From: Qiming Zhao Date: Fri, 17 Apr 2020 16:02:42 +0800 Subject: [PATCH] fix cmd is null for watchBuild --- src/server/features/watchBuild.ts | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/server/features/watchBuild.ts b/src/server/features/watchBuild.ts index 401dd37..f6d33e5 100644 --- a/src/server/features/watchBuild.ts +++ b/src/server/features/watchBuild.ts @@ -120,7 +120,6 @@ export default class WatchProject implements Disposable { workspace.showMessage(`Local & global tsc not found`, 'error') return } - let cmd: string let find = await workspace.findUp(['tsconfig.json']) if (!find) { workspace.showMessage('tsconfig.json not found!', 'error') @@ -128,7 +127,7 @@ export default class WatchProject implements Disposable { } let root = path.dirname(find) return { - cmd, + cmd: tscPath, args: ['-p', 'tsconfig.json', '--watch', 'true', '--pretty', 'false'], cwd: root }