fix(install): Better platform detection (#1827)
Have refactored the platform detection in the install script to try to better detect Windows when running the Windows install script.
This commit is contained in:
parent
eec961caaf
commit
9d5770544e
|
@ -170,19 +170,14 @@ detect_platform() {
|
|||
local platform
|
||||
platform="$(uname -s | tr '[:upper:]' '[:lower:]')"
|
||||
|
||||
# mingw is Git-Bash
|
||||
if echo "${platform}" | grep -i mingw >/dev/null; then
|
||||
platform=pc-windows-msvc
|
||||
fi
|
||||
|
||||
if [ "${platform}" = "linux" ]; then
|
||||
case "${platform}" in
|
||||
msys_nt*) platform="pc-windows-msvc" ;;
|
||||
# mingw is Git-Bash
|
||||
mingw*) platform="pc-windows-msvc" ;;
|
||||
# use the statically compiled musl bins on linux to avoid linking issues.
|
||||
platform=unknown-linux-musl
|
||||
fi
|
||||
|
||||
if [ "${platform}" = "darwin" ]; then
|
||||
platform=apple-darwin
|
||||
fi
|
||||
linux) platform="unknown-linux-musl" ;;
|
||||
darwin) platform="apple-darwin" ;;
|
||||
esac
|
||||
|
||||
echo "${platform}"
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue