Compare commits

...

2 Commits

Author SHA1 Message Date
Buddy f1a2d0292c fix: support arm64 macs in install-sass
get_arch only handled x86_64, so arm64 machines hit "unsupported
uname: arm64" before any download was attempted. Also add a local
get_os override: dart-sass names its macOS assets "macos-*", but the
shared get_os helper returns "darwin", which 404s.
2 weeks ago
Buddy 6b55be7df2 fix: support arm64 in install-lua-language-server
get_arch() only handled x86_64, so arm64 machines failed with
"unsupported architecture: arm64". Also switch the bin symlink to a
wrapper script: lua-language-server locates main.lua relative to its
own unresolved argv[0], so launching it through a symlinked executable
(rather than a symlinked directory) made it fail to find main.lua.
2 weeks ago

@ -13,12 +13,23 @@ main() (
extract_tarball "${URL}" "${DEST}/${VERSION}" extract_tarball "${URL}" "${DEST}/${VERSION}"
set_current_link "${DEST}" "${VERSION}" set_current_link "${DEST}" "${VERSION}"
set_link "${XDG_BIN_HOME}/lua-language-server" "${DEST}" bin/lua-language-server
# lua-language-server locates main.lua next to its own argv[0], without
# resolving symlinks, so it can't be launched through a symlinked
# executable (only a symlinked directory in the path works). Use a
# wrapper script instead of set_link.
cat >"${XDG_BIN_HOME}/lua-language-server" <<EOF
#!/usr/bin/env bash
exec "${DEST}/current/bin/lua-language-server" "\$@"
EOF
chmod +x "${XDG_BIN_HOME}/lua-language-server"
) )
get_arch() ( get_arch() (
case $(uname -m) in case $(uname -m) in
x86_64*) echo x64 ;; x86_64*) echo x64 ;;
arm64*) echo arm64 ;;
aarch64*) echo arm64 ;;
*) *)
echo >&2 "unsupported architecture: $(uname -m)" echo >&2 "unsupported architecture: $(uname -m)"
exit 1 exit 1

@ -19,8 +19,18 @@ main() (
get_arch () ( get_arch () (
case $(uname -m) in case $(uname -m) in
x86_64*) echo x64 ;; x86_64*) echo x64 ;;
arm64*) echo arm64 ;;
aarch64*) echo arm64 ;;
*) >&2 echo "unsupported uname: $(uname -m)"; exit 1 ;; *) >&2 echo "unsupported uname: $(uname -m)"; exit 1 ;;
esac esac
) )
get_os () (
case $(uname -s) in
Linux*) echo linux ;;
Darwin*) echo macos ;;
*) >&2 echo "unsupported os: $(uname -s)"; exit 1 ;;
esac
)
main "${@}" main "${@}"

Loading…
Cancel
Save