Skip to content

Commit

Permalink
#1269 Enfore usage of /bin/bash on Darwin/arm64
Browse files Browse the repository at this point in the history
  • Loading branch information
ascheman committed Oct 29, 2023
1 parent 6d6d045 commit 04c01bf
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions dtcw
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ main() {
# For debugging purpose at the top of the script
arch=$(uname -m)
os=$(uname -s)
bash=bash

print_version_info

Expand Down Expand Up @@ -103,12 +104,13 @@ main() {

emu=""
if [ "${os}" = "Darwin" ] && [ "${arch}" = "arm64" ]; then
echo "Apple silicon detected, using x86_64 mode"
echo "Apple silicon detected, using x86_64 mode and os native bash"
emu="arch -x86_64"
bash="/bin/bash"
fi

# echo "Command to invoke: ${command}"
exec ${emu} bash -c "${command}"
exec ${emu} ${bash} -c "${command}"
}

assert_argument_exists() {
Expand Down

0 comments on commit 04c01bf

Please sign in to comment.