diff options
author | Thomas O'Donnell <andytom@users.noreply.github.com> | 2020-08-16 17:30:10 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-08-16 11:30:10 -0400 |
commit | 2e14d1af5a3b90aedab39180e0851e8f945b9f55 (patch) | |
tree | e3d172764ac4cbab68410fd4588b33d518fac92b /install/install.sh | |
parent | f219d310cf95c4d4e032803c94d3a06ff0976c42 (diff) |
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.
Diffstat (limited to 'install/install.sh')
-rwxr-xr-x | install/install.sh | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/install/install.sh b/install/install.sh index 0e5e46ee8..25f369556 100755 --- a/install/install.sh +++ b/install/install.sh @@ -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 |