lib.util.run_cmd(): Fix forgotten cmd_input #132
Loading…
Reference in a new issue
No description provided.
Delete branch "jan/feature/20261003-lib-util-run-cmd-fix-forgotten-cmd-input"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
lib.util.run_cmd(): Fix forgotten cmd_input
jw-pkg secrets list-secretsspams the console without--interactive=falsebecause 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 fromcmd_input, but it never forwardscmd_inputtoExecContext.run(). Sincerun()defaults to InputMode.OptInteractive, an explicitcmd_inputis 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_inputin kwargs so the requested input mode reachesrun().