From 5fd55ef5c02921f5cef146b0cfab9421dfd4f3d2 Mon Sep 17 00:00:00 2001 From: Jared Weakly Date: Fri, 27 Mar 2020 17:59:12 -0700 Subject: [PATCH] Don't unnecessarily split args --- dist/index.js | 13 ++++++++++--- src/installer.ts | 13 ++++++++++--- 2 files changed, 20 insertions(+), 6 deletions(-) diff --git a/dist/index.js b/dist/index.js index 6387c02..1341984 100644 --- a/dist/index.js +++ b/dist/index.js @@ -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 { diff --git a/src/installer.ts b/src/installer.ts index ab3a2e0..59d8804 100644 --- a/src/installer.ts +++ b/src/installer.ts @@ -131,9 +131,16 @@ async function installTool(tool: Tool, version: string): Promise { } 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(