From 55db32689814291476df54abfe08f3dcd98e7a09 Mon Sep 17 00:00:00 2001 From: Jan Lindemann Date: Sat, 3 Oct 2026 08:39:13 +0200 Subject: [PATCH] lib.util.run_cmd(): Fix forgotten cmd_input jw-pkg secrets list-secrets spams the console without --interactive=false because it thinks it should query packages and files in interactive mode. The underlying bug is that run_cmd() derives the interactive flag of a freshly created Local context from cmd_input, but it never forwards cmd_input to ExecContext.run(). Since run() defaults to InputMode.OptInteractive, an explicit cmd_input is silently ignored: a byte string is not fed to the command's stdin, InputMode.Auto is downgraded to non-interactive, and with a caller-provided ExecContext the requested mode is lost in all cases. Forward cmd_input in kwargs so the requested input mode reaches run(). Signed-off-by: Jan Lindemann Assisted-by: unsloth/Qwen3.8-27B-GGUF:Q4_K_M with pi.dev v0.99.2 --- src/python/jw/pkg/lib/util.py | 1 + 1 file changed, 1 insertion(+) diff --git a/src/python/jw/pkg/lib/util.py b/src/python/jw/pkg/lib/util.py index 4e97cff4..1295e4c7 100644 --- a/src/python/jw/pkg/lib/util.py +++ b/src/python/jw/pkg/lib/util.py @@ -53,6 +53,7 @@ async def run_cmd( interactive = cmd_input == InputMode.Interactive ec = Local(verbose_default = verbose, interactive = interactive) kwargs['verbose'] = verbose + kwargs['cmd_input'] = cmd_input return await ec.run(*args, **kwargs) async def run_curl( -- 2.56.0