Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
Moomboh committed Apr 28, 2023
1 parent 6ccc3cb commit ff28421
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/shellingham/posix/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,11 @@ def _get_shell(cmd, *args):
if cmd.startswith("-"): # Login shell! Let's use this.
return _get_login_shell(cmd)
name = os.path.basename(cmd).lower()
if name == "rosetta" or name.contains("qemu-"):
# Running (probably in docker) with rosetta or qemu, first arg is real command
cmd = args[0]
args = args[1:]
name = os.path.basename(cmd).lower()
if name in SHELL_NAMES: # Command looks like a shell.
return (name, cmd)
shell = _get_interpreter_shell(name, args)
Expand Down

0 comments on commit ff28421

Please sign in to comment.