mirror of
https://github.com/starship/starship.git
synced 2024-11-24 17:23:49 +01:00
fix(install): switch to install the musl binaries by default (#1590)
We have had a few issues where users haave run the install script and have ended up with a non-functioning version of starship because their system doesn't have a required lib that we link against. To avoid these problems it seems the easiest solution is to default to using the statically compiled musl binaries. If a user knows that they are doing they can use the non-statically compiled binaries by supplying the `-p` argument to the installer. Note this is what other rust based tools such as ripgrep do.
This commit is contained in:
parent
f219d310cf
commit
2e14d1af5a
@ -170,20 +170,14 @@ detect_platform() {
|
||||
local platform
|
||||
platform="$(uname -s | tr '[:upper:]' '[:lower:]')"
|
||||
|
||||
# check for MUSL
|
||||
if [ "${platform}" = "linux" ]; then
|
||||
if ldd /bin/sh | grep -i musl >/dev/null; then
|
||||
platform=unknown-linux-musl
|
||||
fi
|
||||
fi
|
||||
|
||||
# mingw is Git-Bash
|
||||
if echo "${platform}" | grep -i mingw >/dev/null; then
|
||||
platform=pc-windows-msvc
|
||||
fi
|
||||
|
||||
if [ "${platform}" = "linux" ]; then
|
||||
platform=unknown-linux-gnu
|
||||
# use the statically compiled musl bins on linux to avoid linking issues.
|
||||
platform=unknown-linux-musl
|
||||
fi
|
||||
|
||||
if [ "${platform}" = "darwin" ]; then
|
||||
|
Loading…
Reference in New Issue
Block a user