Don't unnecessarily split args
This commit is contained in:
13
dist/index.js
vendored
13
dist/index.js
vendored
@@ -8658,9 +8658,16 @@ async function installTool(tool, version) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (process.platform === 'win32') {
|
if (process.platform === 'win32') {
|
||||||
const cmd = ['choco', 'install', tool, '--version', version];
|
await exec_1.exec('powershell', [
|
||||||
const flags = ['-m', '--no-progress', '-r'];
|
'choco',
|
||||||
await exec_1.exec('powershell', cmd.concat(flags));
|
'install',
|
||||||
|
tool,
|
||||||
|
'--version',
|
||||||
|
version,
|
||||||
|
'-m',
|
||||||
|
'--no-progress',
|
||||||
|
'-r'
|
||||||
|
]);
|
||||||
core.addPath(path_1.join(process.env.ChocolateyInstall || '', 'lib', `${tool}.${version}`, 'tools', `${tool}-${version}`, tool === 'ghc' ? 'bin' : ''));
|
core.addPath(path_1.join(process.env.ChocolateyInstall || '', 'lib', `${tool}.${version}`, 'tools', `${tool}-${version}`, tool === 'ghc' ? 'bin' : ''));
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
|||||||
@@ -131,9 +131,16 @@ async function installTool(tool: Tool, version: string): Promise<void> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (process.platform === 'win32') {
|
if (process.platform === 'win32') {
|
||||||
const cmd = ['choco', 'install', tool, '--version', version];
|
await exec('powershell', [
|
||||||
const flags = ['-m', '--no-progress', '-r'];
|
'choco',
|
||||||
await exec('powershell', cmd.concat(flags));
|
'install',
|
||||||
|
tool,
|
||||||
|
'--version',
|
||||||
|
version,
|
||||||
|
'-m',
|
||||||
|
'--no-progress',
|
||||||
|
'-r'
|
||||||
|
]);
|
||||||
|
|
||||||
core.addPath(
|
core.addPath(
|
||||||
join(
|
join(
|
||||||
|
|||||||
Reference in New Issue
Block a user