pmb.helpers.run: don't pass stdin to output=stdout
When looking at the table for possible output modes, it only makes sense to pass stdin to "interactive" and "tui". The output mode "stdout" is for non-interactive commands. This fixes apk going interactive (asking for confirmation) when running pmbootstrap with --details-to-stdout and building a package that depends on postmarketos-base. Fixes: issue 2208 Tested-by: Clayton Craft <clayton@craftyguy.net> Reviewed-by: Clayton Craft <clayton@craftyguy.net> Link: https://lists.sr.ht/~postmarketos/pmbootstrap-devel/%3C20230301204112.4351-1-ollieparanoid@postmarketos.org%3E
This commit is contained in:
parent
a26e203f53
commit
60901ac462
|
@ -288,7 +288,7 @@ def core(args, log_message, cmd, working_dir=None, output="log",
|
|||
output value | timeout | out to log | out to stdout | wait | pass stdin
|
||||
------------------------------------------------------------------------
|
||||
"log" | x | x | | x |
|
||||
"stdout" | x | x | x | x | x
|
||||
"stdout" | x | x | x | x |
|
||||
"interactive" | | x | x | x | x
|
||||
"tui" | | | x | x | x
|
||||
"background" | | x | | |
|
||||
|
@ -338,7 +338,7 @@ def core(args, log_message, cmd, working_dir=None, output="log",
|
|||
|
||||
output_timeout = output in ["log", "stdout"] and not disable_timeout
|
||||
|
||||
stdin = subprocess.DEVNULL if output == "log" else None
|
||||
stdin = subprocess.DEVNULL if output in ["log", "stdout"] else None
|
||||
|
||||
(code, output_after_run) = foreground_pipe(args, cmd, working_dir,
|
||||
output_to_stdout,
|
||||
|
|
Loading…
Reference in New Issue