Skip to content

Commit

Permalink
Pass all parameters to the relaunched shell
Browse files Browse the repository at this point in the history
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]>
  • Loading branch information
MarcelBochtler committed Jul 9, 2022
1 parent 0e64894 commit e5cdd1f
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion configure
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
2 changes: 1 addition & 1 deletion scancode
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down

0 comments on commit e5cdd1f

Please sign in to comment.