]> glassweightruler.freedombox.rocks Git - waydroid.git/commitdiff
fix(shell): allow command to have arguments
authorMaxime Brunet <max@brnt.mx>
Sat, 10 Dec 2022 19:46:46 +0000 (11:46 -0800)
committerAlessandro Astone <ales.astone@gmail.com>
Sun, 11 Dec 2022 00:44:57 +0000 (01:44 +0100)
tools/helpers/arguments.py
tools/helpers/lxc.py

index 85b9045f0eda3d08f4b0832850345db50a82973e..5f1893e384e139f2d0d292c0c173c5a6671d0d42 100644 (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):
index cb0b56c4fc7deba64bc2ffe36602c46ed5066483..19a7ceb9b7760907ce3d4488509c2e6d8cbfee63 100644 (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"})