From 9ca787d8ac91fe9dc749bbd6437fab474012d2d0 Mon Sep 17 00:00:00 2001 From: Dirk Baeumer Date: Mon, 19 Jun 2017 11:25:57 +0200 Subject: [PATCH] Fixes #28139: Fix TS 2.4 Errors in extHostTask.ts --- src/vs/workbench/api/node/extHostTask.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/vs/workbench/api/node/extHostTask.ts b/src/vs/workbench/api/node/extHostTask.ts index 6fbc70d641e..e66f2582316 100644 --- a/src/vs/workbench/api/node/extHostTask.ts +++ b/src/vs/workbench/api/node/extHostTask.ts @@ -252,7 +252,7 @@ namespace Strings { } namespace CommandOptions { - function isShellOptions(value: any): value is vscode.ShellTaskOptions { + function isShellConfiguration(value: any): value is { executable: string; shellArgs?: string[] } { return value && typeof value.executable === 'string'; } export function from(value: vscode.ShellTaskOptions | vscode.ProcessTaskOptions): TaskSystem.CommandOptions { @@ -273,7 +273,7 @@ namespace CommandOptions { } }); } - if (isShellOptions(value)) { + if (isShellConfiguration(value)) { result.shell = ShellConfiguration.from(value); } return result; @@ -281,14 +281,14 @@ namespace CommandOptions { } namespace ShellConfiguration { - export function from(value: { executable?: string, args?: string[] }): TaskSystem.ShellConfiguration { + export function from(value: { executable?: string, shellArgs?: string[] }): TaskSystem.ShellConfiguration { if (value === void 0 || value === null || !value.executable) { return undefined; } let result: TaskSystem.ShellConfiguration = { executable: value.executable, - args: Strings.from(value.args) + args: Strings.from(value.shellArgs) }; return result; }