From: Michael Tremer Date: Wed, 8 Dec 2021 17:28:58 +0000 (+0000) Subject: pakfire: execute: Add --non-interactive switch X-Git-Tag: 0.9.28~855 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=b2c3cfed2cf4cd0110f75ca9d3e50e2042331a21;p=pakfire.git pakfire: execute: Add --non-interactive switch Signed-off-by: Michael Tremer --- diff --git a/src/scripts/pakfire.in b/src/scripts/pakfire.in index a9afd8784..ac228f14b 100644 --- a/src/scripts/pakfire.in +++ b/src/scripts/pakfire.in @@ -75,6 +75,8 @@ class Cli(object): help=_("Executes a command in the pakfire environment (useful for development)")) execute.add_argument("--bind", action="append", default=[], dest="binds", help=_("Bind-mounts the given directory")) + execute.add_argument("--non-interactive", action="store_false", dest="interactive", + help=_("Run in non-interactive mode")) execute.add_argument("command", nargs=argparse.REMAINDER) execute.set_defaults(func=self._execute) @@ -302,7 +304,8 @@ class Cli(object): else: sys.stdout.write("%s\n" % line) - return p.execute(args.command, logging_callback=logging_callback) + return p.execute(args.command, + interactive=args.interactive, logging_callback=logging_callback) def _info(self, p, args): for pkg in p.search(args.package, name_only=True):