aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/action.yml
diff options
context:
space:
mode:
authorEgor Tensin <Egor.Tensin@gmail.com>2021-01-15 18:51:13 +0300
committerEgor Tensin <Egor.Tensin@gmail.com>2021-01-15 19:13:02 +0300
commit1bce9a967239a8f4260f4cd43b1e041335ed2ddf (patch)
tree45ec94aa860d10724dd7929155f6fff57d33fa9f /action.yml
parentrefactoring (diff)
downloadsetup-mingw-1bce9a967239a8f4260f4cd43b1e041335ed2ddf.tar.gz
setup-mingw-1bce9a967239a8f4260f4cd43b1e041335ed2ddf.zip
Windows: choco scripting best practices
Diffstat (limited to '')
-rw-r--r--action.yml10
1 files changed, 5 insertions, 5 deletions
diff --git a/action.yml b/action.yml
index bde223a..181e709 100644
--- a/action.yml
+++ b/action.yml
@@ -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