Merge branch 'fix/build-output-retrieval' into fix/linux-act-setup

This commit is contained in:
Sanjula Ganepola
2024-11-26 22:11:58 -05:00

View File

@@ -100,7 +100,7 @@ export class Act {
'Chocolatey': 'choco install act-cli',
'Winget': 'winget install nektos.act',
'Scoop': 'scoop install act',
'GitHub CLI': 'gh auth status || gh auth login && gh extension install https://github.com/nektos/gh-act'
'GitHub CLI': '(gh auth status || gh auth login) && gh extension install https://github.com/nektos/gh-act'
};
this.prebuiltExecutables = {
@@ -115,7 +115,7 @@ export class Act {
'Homebrew': 'brew install act',
'Nix': 'nix run nixpkgs#act',
'MacPorts': 'sudo port install act',
'GitHub CLI': 'gh auth status || gh auth login && gh extension install https://github.com/nektos/gh-act'
'GitHub CLI': '(gh auth status || gh auth login) && gh extension install https://github.com/nektos/gh-act'
};
this.prebuiltExecutables = {
@@ -130,7 +130,7 @@ export class Act {
'Arch': 'pacman -Syu act',
'AUR': 'yay -Syu act',
'COPR': 'dnf copr enable goncalossilva/act && dnf install act-cli',
'GitHub CLI': 'gh auth status || gh auth login && gh extension install https://github.com/nektos/gh-act'
'GitHub CLI': '(gh auth status || gh auth login) && gh extension install https://github.com/nektos/gh-act'
};
this.prebuiltExecutables = {
@@ -191,19 +191,6 @@ export class Act {
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) {
return await this.runCommand({
path: workspaceFolder.uri.fsPath,
@@ -376,11 +363,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
@@ -474,7 +474,7 @@ export class Act {
problemMatchers: [],
runOptions: {},
group: TaskGroup.Build,
execution: new ShellExecution(command, { executable: this.getShell() })
execution: new ShellExecution(command)
});
}
}