From e5cdd1f44c0c4227fff2554cee1d0c38a2ec9000 Mon Sep 17 00:00:00 2001 From: Marcel Bochtler Date: Sat, 9 Jul 2022 19:00:42 +0200 Subject: [PATCH] Pass all parameters to the relaunched shell Calling `bash -c` with `$@` results in only the first parameter being passed to the subshell. Use `$*` to ensure all parameters are correctly passed to the Rosetta 2 emulated subshell. Signed-off-by: Marcel Bochtler --- configure | 2 +- scancode | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/configure b/configure index 4535740352f..e11658debae 100755 --- a/configure +++ b/configure @@ -120,7 +120,7 @@ CFG_BIN_DIR=$CFG_ROOT_DIR/$VIRTUALENV_DIR/bin # force relaunching under X86-64 architecture on macOS M1/ARM if [[ $OSTYPE == 'darwin'* && $(uname -m) == 'arm64' && $(sysctl -in sysctl.proc_translated) == 0 ]]; then - arch -x86_64 /bin/bash -c "$CFG_ROOT_DIR/configure $@" + arch -x86_64 /bin/bash -c "$CFG_ROOT_DIR/configure $*" exit $? fi diff --git a/scancode b/scancode index 9053027a0bb..a2dbe19df79 100755 --- a/scancode +++ b/scancode @@ -122,7 +122,7 @@ SCANCODE_ROOT_DIR="$( cd "$( dirname "${SCANCODE_BIN}" )" && pwd )" # force relaunching under X86-64 architecture on macOS M1/ARM if [[ $OSTYPE == 'darwin'* && $(uname -m) == 'arm64' && $(sysctl -in sysctl.proc_translated) == 0 ]]; then - arch -x86_64 /bin/bash -c "$SCANCODE_ROOT_DIR/$COMMAND_TO_RUN $@" + arch -x86_64 /bin/bash -c "$SCANCODE_ROOT_DIR/$COMMAND_TO_RUN $*" exit $? fi