Skip to content

Commit

Permalink
fix: Bug with silent fail and aarch64
Browse files Browse the repository at this point in the history
In Debian `get_arch` returns `aarch64` which then causes a failure.
Unfortunately, because the failure happens during an assignment
it isn't surfaced to stderr.
This PR adds a mapping for `aarch64` -> `arm64` and fixes the
silent fail but forcing the output to `/dev/stderr`.
  • Loading branch information
ltickett authored and pdemagny committed Dec 8, 2023
1 parent 9a3b1c0 commit da02d85
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/utils.bash
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ TOOL_NAME="vale"
TOOL_TEST="vale --version"

fail() {
echo -e "asdf-$TOOL_NAME: $*"
echo -e "asdf-$TOOL_NAME: $*" > /dev/stderr
exit 1
}

Expand All @@ -26,6 +26,7 @@ get_arch() {
case $arch in
x86_64) arch="64-bit" ;;
arm64) arch="arm64" ;;
aarch64) arch="arm64" ;;
*) fail "The architecture (${arch}) is not supported by this installation script." ;;
esac
echo "$arch"
Expand Down

0 comments on commit da02d85

Please sign in to comment.