Commit f6064ea
authored
Support extractcode on Apple ARM chip nexB#2835
This commit carries over a patch applied to the scancode and configure
scripts to ensure that extractcode can work correctly in X86 emulated
mode on Apple ARM silicon,
* Only relaunch extractcode when not in emulation mode
Running `uname -m` on Apple silicon machines always results in `arm64`,
regardless if Bash is running in Rosetta 2 emulation or natively. Check
if extractcode is running in emulation mode (see [1]), before
relaunching it, to avoid an infinite loop.
*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.
[1]: https://developer.apple.com/documentation/apple-silicon/about-the-rosetta-translation-environment
Reported-by: Marcel Bochtler <git@bochtler.io>
Authored-by: Marcel Bochtler <git@bochtler.io>
Signed-off-by: Philippe Ombredanne <pombredanne@nexb.com>1 parent 58b8a89 commit f6064ea
1 file changed
Lines changed: 2 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
121 | 121 | | |
122 | 122 | | |
123 | 123 | | |
124 | | - | |
125 | | - | |
| 124 | + | |
| 125 | + | |
126 | 126 | | |
127 | 127 | | |
128 | 128 | | |
| |||
0 commit comments