Don't unnecessarily split args

This commit is contained in:
Jared Weakly
2020-03-27 17:59:12 -07:00
parent d3ac0a8114
commit 5fd55ef5c0
2 changed files with 20 additions and 6 deletions

13
dist/index.js vendored
View File

@@ -8658,9 +8658,16 @@ async function installTool(tool, version) {
}
}
if (process.platform === 'win32') {
const cmd = ['choco', 'install', tool, '--version', version];
const flags = ['-m', '--no-progress', '-r'];
await exec_1.exec('powershell', cmd.concat(flags));
await exec_1.exec('powershell', [
'choco',
'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' : ''));
}
else {

View File

@@ -131,9 +131,16 @@ async function installTool(tool: Tool, version: string): Promise<void> {
}
if (process.platform === 'win32') {
const cmd = ['choco', 'install', tool, '--version', version];
const flags = ['-m', '--no-progress', '-r'];
await exec('powershell', cmd.concat(flags));
await exec('powershell', [
'choco',
'install',
tool,
'--version',
version,
'-m',
'--no-progress',
'-r'
]);
core.addPath(
join(