mirror of
https://github.com/oven-sh/bun
synced 2026-02-11 19:38:58 +00:00
fix(install.sh): support windows mingw platform (#11017)
This commit is contained in:
@@ -1,9 +1,13 @@
|
||||
#!/usr/bin/env bash
|
||||
set -euo pipefail
|
||||
|
||||
platform=$(uname -ms)
|
||||
|
||||
if [[ ${OS:-} = Windows_NT ]]; then
|
||||
if [[ $platform != MINGW64* ]]; then
|
||||
powershell -c "irm bun.sh/install.ps1|iex"
|
||||
exit $?
|
||||
fi
|
||||
fi
|
||||
|
||||
# Reset
|
||||
@@ -56,7 +60,7 @@ if [[ $# -gt 2 ]]; then
|
||||
error 'Too many arguments, only 2 are allowed. The first can be a specific tag of bun to install. (e.g. "bun-v0.1.4") The second can be a build variant of bun to install. (e.g. "debug-info")'
|
||||
fi
|
||||
|
||||
case $(uname -ms) in
|
||||
case $platform in
|
||||
'Darwin x86_64')
|
||||
target=darwin-x64
|
||||
;;
|
||||
@@ -66,6 +70,9 @@ case $(uname -ms) in
|
||||
'Linux aarch64' | 'Linux arm64')
|
||||
target=linux-aarch64
|
||||
;;
|
||||
'MINGW64'*)
|
||||
target=windows-x64
|
||||
;;
|
||||
'Linux x86_64' | *)
|
||||
target=linux-x64
|
||||
;;
|
||||
|
||||
Reference in New Issue
Block a user