From 4f96f9fecb8c952fa32ff791b0a77d93d5191bb4 Mon Sep 17 00:00:00 2001 From: Egor Tensin Date: Fri, 15 Jan 2021 19:51:15 +0300 Subject: choco scripting best practices --- action.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/action.yml b/action.yml index fc5ecc4..7779fd1 100644 --- a/action.yml +++ b/action.yml @@ -53,15 +53,15 @@ runs: $choco = Locate-Choco $choco_params = @( - 'install', + 'upgrade', + 'cygwin', '-y', '--no-progress', - '--params', "/InstallDir:$install_dir" + "--package-parameters='/InstallDir:$install_dir'" ) if (!$x64) { $choco_params += '--x86' } - $choco_params += 'cygwin' # Assuming that Cygwin is not installed when this is run. & $choco $choco_params @@ -71,7 +71,7 @@ runs: $pkg_list = $packages.Split(' ', [System.StringSplitOptions]::RemoveEmptyEntries) if ($pkg_list.Count -gt 0) { - & $choco install -y --no-progress --source=cygwin $pkg_list + & $choco install $pkg_list -y --no-progress --source=cygwin } shell: pwsh -- cgit v1.2.3