From 0f9b56e0d739c5f1e411949ff815bc61a0a4b410 Mon Sep 17 00:00:00 2001 From: Sanjula Ganepola Date: Tue, 26 Nov 2024 22:11:21 -0500 Subject: [PATCH] Use hardcoded shells for act commands Signed-off-by: Sanjula Ganepola --- src/act.ts | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/src/act.ts b/src/act.ts index 421e0b8..a353fb4 100644 --- a/src/act.ts +++ b/src/act.ts @@ -190,19 +190,6 @@ export class Act { return ConfigurationManager.get(Section.actCommand) || Act.command; } - private getShell() { - switch (process.platform) { - case Platform.windows: - return 'cmd'; - case Platform.mac: - return 'zsh'; - case Platform.linux: - return 'bash'; - default: - return env.shell; - } - } - async runAllWorkflows(workspaceFolder: WorkspaceFolder) { return await this.runCommand({ path: workspaceFolder.uri.fsPath, @@ -375,11 +362,24 @@ export class Act { } } + let shell = env.shell; + switch (process.platform) { + case Platform.windows: + shell = 'cmd'; + break; + case Platform.mac: + shell = 'zsh'; + break; + case Platform.linux: + shell = 'bash'; + break; + } + const exec = childProcess.spawn( command, { cwd: commandArgs.path, - shell: this.getShell(), + shell: shell, env: { ...process.env, ...settings.secrets @@ -470,7 +470,7 @@ export class Act { problemMatchers: [], runOptions: {}, group: TaskGroup.Build, - execution: new ShellExecution(command, { executable: this.getShell() }) + execution: new ShellExecution(command) }); } }