mirror of
https://github.com/waydroid/waydroid.git
synced 2026-05-24 16:49:30 -04:00
fix(shell): allow command to have arguments
This commit is contained in:
committed by
Alessandro Astone
parent
38aebb39e4
commit
1be55b971d
@@ -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):
|
||||
|
||||
@@ -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"})
|
||||
|
||||
Reference in New Issue
Block a user