Skip to content

Commit 5a6af17

Browse files
committed
fix: modify install script for alpine
1 parent 1ff09b8 commit 5a6af17

File tree

1 file changed

+17
-1
lines changed

1 file changed

+17
-1
lines changed

install.sh

+17-1
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ Usage:
5858
- If Homebrew is not installed it will install the latest standalone release
5959
into ~/.local
6060
61-
- For FreeBSD, it will install the npm package with yarn or npm.
61+
- For FreeBSD or Alpine, it will install the npm package with yarn or npm.
6262
6363
- If ran on an architecture with no releases, it will install the
6464
npm package with yarn or npm.
@@ -238,6 +238,17 @@ main() {
238238
return
239239
fi
240240

241+
if [ "$OS" = "linux" ] && [ "$(distro)" = "alpine" ]; then
242+
if [ "$METHOD" = standalone ]; then
243+
echoerr "No precompiled releases available for alpine."
244+
echoerr 'Please rerun without the "--method standalone" flag to install from npm.'
245+
exit 1
246+
fi
247+
echoh "No precompiled releases available for alpine."
248+
install_npm
249+
return
250+
fi
251+
241252
CACHE_DIR="$(echo_cache_dir)"
242253

243254
if [ "$METHOD" = standalone ]; then
@@ -473,6 +484,11 @@ distro() {
473484
)
474485
return
475486
fi
487+
488+
if [ -f /etc/alpine-release ]; then
489+
echo "alpine"
490+
return
491+
fi
476492
}
477493

478494
# os_name prints a pretty human readable name for the OS/Distro.

0 commit comments

Comments
 (0)