aboutsummaryrefslogtreecommitdiff
path: root/src/cli/install.sh
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/cli/install.sh3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/cli/install.sh b/src/cli/install.sh
index c8a6be426..60529129f 100644
--- a/src/cli/install.sh
+++ b/src/cli/install.sh
@@ -73,7 +73,8 @@ esac
if [[ $target = darwin-x64 ]]; then
# Is this process running in Rosetta?
- if [[ $(sysctl -n sysctl.proc_translated) = 1 ]]; then
+ # redirect stderr to devnull to avoid error message when not running in Rosetta
+ if [[ $(sysctl -n sysctl.proc_translated 2>/dev/null) = 1 ]]; then
target=darwin-aarch64
info "Your shell is running in Rosetta 2. Downloading bun for $target instead"
fi