diff options
author | Egor Tensin <Egor.Tensin@gmail.com> | 2021-01-15 18:51:13 +0300 |
---|---|---|
committer | Egor Tensin <Egor.Tensin@gmail.com> | 2021-01-15 19:13:02 +0300 |
commit | 1bce9a967239a8f4260f4cd43b1e041335ed2ddf (patch) | |
tree | 45ec94aa860d10724dd7929155f6fff57d33fa9f | |
parent | refactoring (diff) | |
download | setup-mingw-1bce9a967239a8f4260f4cd43b1e041335ed2ddf.tar.gz setup-mingw-1bce9a967239a8f4260f4cd43b1e041335ed2ddf.zip |
Windows: choco scripting best practices
Diffstat (limited to '')
-rw-r--r-- | action.yml | 10 |
1 files changed, 5 insertions, 5 deletions
@@ -75,10 +75,10 @@ runs: sudo apt-get install -yq --no-install-recommends $Packages } elseif ($script:cygwin_host) { $choco = Locate-Choco - & $choco install -y --no-progress --source=cygwin $Packages + & $choco install $Packages -y --no-progress --source=cygwin } elseif ($script:windows_host) { $choco = Locate-Choco - & $choco install -y --no-progress $Packages + & $choco upgrade $Packages -y --no-progress --allow-downgrade } else { throw "Sorry, installing packages is unsupported on $script:os" } @@ -94,10 +94,10 @@ runs: sudo apt-get autoremove --purge -yq $Packages } elseif ($script:cygwin_host) { $choco = Locate-Choco - & $choco uninstall -y --no-progress --source=cygwin $Packages + & $choco uninstall $Packages -y --no-progress --source=cygwin } elseif ($script:windows_host) { $choco = Locate-Choco - & $choco uninstall -y --no-progress $Packages + & $choco uninstall $Packages -y --no-progress } else { throw "Sorry, removing packages is unsupported on $script:os" } @@ -156,10 +156,10 @@ runs: # <thread>, etc.). $version = '8.1.0' - Remove-Package $pkg if ($x64) { Install-Package $pkg --version $version } else { + Remove-Package $pkg Install-Package $pkg --version $version --x86 } echo $mingw_bin >> $env:GITHUB_PATH |