Skip to content

Commit 58b8a89

Browse files
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 <[email protected]>
1 parent 6a01546 commit 58b8a89

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

configure

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ CFG_BIN_DIR=$CFG_ROOT_DIR/$VIRTUALENV_DIR/bin
120120

121121
# force relaunching under X86-64 architecture on macOS M1/ARM
122122
if [[ $OSTYPE == 'darwin'* && $(uname -m) == 'arm64' && $(sysctl -in sysctl.proc_translated) == 0 ]]; then
123-
arch -x86_64 /bin/bash -c "$CFG_ROOT_DIR/configure $@"
123+
arch -x86_64 /bin/bash -c "$CFG_ROOT_DIR/configure $*"
124124
exit $?
125125
fi
126126

scancode

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ SCANCODE_ROOT_DIR="$( cd "$( dirname "${SCANCODE_BIN}" )" && pwd )"
122122

123123
# force relaunching under X86-64 architecture on macOS M1/ARM
124124
if [[ $OSTYPE == 'darwin'* && $(uname -m) == 'arm64' && $(sysctl -in sysctl.proc_translated) == 0 ]]; then
125-
arch -x86_64 /bin/bash -c "$SCANCODE_ROOT_DIR/$COMMAND_TO_RUN $@"
125+
arch -x86_64 /bin/bash -c "$SCANCODE_ROOT_DIR/$COMMAND_TO_RUN $*"
126126
exit $?
127127
fi
128128

0 commit comments

Comments
 (0)