fix(shell): allow command to have arguments

This commit is contained in:
Maxime Brunet
2022-12-10 11:46:46 -08:00
committed by Alessandro Astone
parent 38aebb39e4
commit 1be55b971d
2 changed files with 2 additions and 2 deletions

View File

@@ -110,7 +110,7 @@ def arguments_firstLaunch(subparser):
def arguments_shell(subparser):
ret = subparser.add_parser("shell", help="run remote shell command")
ret.add_argument('COMMAND', nargs='?', help="command to run")
ret.add_argument('COMMAND', nargs='*', help="command to run")
return ret
def arguments_logcat(subparser):

View File

@@ -373,7 +373,7 @@ def shell(args):
command = ["lxc-attach", "-P", tools.config.defaults["lxc"],
"-n", "waydroid", "--"]
if args.COMMAND:
command.append(args.COMMAND)
command.extend(args.COMMAND)
else:
command.append("/system/bin/sh")
subprocess.run(command, env={"PATH": os.environ['PATH'] + ":/system/bin:/vendor/bin"})