Use hardcoded shells for act commands

Signed-off-by: Sanjula Ganepola <sanjulagane@gmail.com>
This commit is contained in:
Sanjula Ganepola
2024-11-26 22:11:21 -05:00
parent ecbc4dccb5
commit 0f9b56e0d7

View File

@@ -190,19 +190,6 @@ export class Act {
return ConfigurationManager.get<string>(Section.actCommand) || Act.command; return ConfigurationManager.get<string>(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) { async runAllWorkflows(workspaceFolder: WorkspaceFolder) {
return await this.runCommand({ return await this.runCommand({
path: workspaceFolder.uri.fsPath, 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( const exec = childProcess.spawn(
command, command,
{ {
cwd: commandArgs.path, cwd: commandArgs.path,
shell: this.getShell(), shell: shell,
env: { env: {
...process.env, ...process.env,
...settings.secrets ...settings.secrets
@@ -470,7 +470,7 @@ export class Act {
problemMatchers: [], problemMatchers: [],
runOptions: {}, runOptions: {},
group: TaskGroup.Build, group: TaskGroup.Build,
execution: new ShellExecution(command, { executable: this.getShell() }) execution: new ShellExecution(command)
}); });
} }
} }