Skip to content

Commit 45f7bbc

Browse files
committed
Fix #74
1 parent 6ccc3cb commit 45f7bbc

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/shellingham/posix/__init__.py

+5
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,11 @@ def _get_shell(cmd, *args):
7171
if cmd.startswith("-"): # Login shell! Let's use this.
7272
return _get_login_shell(cmd)
7373
name = os.path.basename(cmd).lower()
74+
if name == "rosetta" or name.contains("qemu-"):
75+
# Running (probably in docker) with rosetta or qemu, first arg is real command
76+
cmd = args[0]
77+
args = args[1:]
78+
name = os.path.basename(cmd).lower()
7479
if name in SHELL_NAMES: # Command looks like a shell.
7580
return (name, cmd)
7681
shell = _get_interpreter_shell(name, args)

0 commit comments

Comments
 (0)