Skip to content

Commit

Permalink
Fix OS detection on Windows with MSYS
Browse files Browse the repository at this point in the history
Installing MinGW with Scoop yields a $(uname -s) starting with MINGW,
whereas the one that comes preinstalled on the GitHub Actions Windows
runner (which comes from Git for Windows, I think) starts with MSYS
instead. I noticed that these two cases are also hardcoded into the
gradlew script, so I feel pretty confident this is an OK fix.
  • Loading branch information
ctrueden committed Feb 3, 2024
1 parent 6b861c9 commit 1fa0bf2
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion bin/dist.sh
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ os=$(uname -s)
case "$os" in
Linux) os=linux ;;
Darwin) os=macos ;;
MINGW*) os=windows ;;
MINGW*|MSYS*) os=windows ;;
esac
arch=$(uname -m)
case "$arch" in
Expand Down
2 changes: 1 addition & 1 deletion bin/pack.sh
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ then
curl -fsLO https://github.com/upx/upx/releases/download/v$v/upx-$v-amd64_linux.tar.xz &&
tar xf upx-$v-amd64_linux.tar.xz
) ;;
MINGW*-x86_64) (
MINGW*-x86_64|MSYS*-x86_64) (
mkdir .upx &&
cd .upx &&
curl -fsLO https://github.com/upx/upx/releases/download/v$v/upx-$v-win64.zip &&
Expand Down

0 comments on commit 1fa0bf2

Please sign in to comment.