diff --git a/bootstrap.sh b/bootstrap.sh index d8bd3b3a8b9..1d32620f63a 100755 --- a/bootstrap.sh +++ b/bootstrap.sh @@ -127,12 +127,11 @@ function install_dep() { # 1. Installation of dependencies. # -# Wrapper around the `arch` command which plays nice with OS X +# We should not use the arch command, since it is not reliably +# available on macOS or some linuxes: +# https://www.gnu.org/software/coreutils/manual/html_node/arch-invocation.html function get_arch() { - case $(uname) in - Linux) arch;; - Darwin) uname -m;; - esac + uname -m } diff --git a/dev.env b/dev.env index 54dd9cb41b9..096dd0aaf7e 100644 --- a/dev.env +++ b/dev.env @@ -79,7 +79,7 @@ export PKG_CONFIG_PATH # According to https://github.com/etcd-io/etcd/blob/a621d807f061e1dd635033a8d6bc261461429e27/Documentation/op-guide/supported-platform.md, # currently, etcd is unstable on arm64, so ETCD_UNSUPPORTED_ARCH should be set. -if [ "$(arch)" == aarch64 ]; then +if [ "$(uname -m)" == aarch64 ]; then export ETCD_UNSUPPORTED_ARCH=arm64 fi