mirror of
ssh://git.janware.com/janware/proj/jw-pkg
synced 2026-04-24 17:23:36 +02:00
jw.pkg.lib.util.run_sudo(): Add parameter verbose
Add parameter verbose to run_sudo() and pass it on to run_cmd(). Signed-off-by: Jan Lindemann <jan@janware.com>
This commit is contained in:
parent
d004e2c5ec
commit
6916d7edc8
1 changed files with 2 additions and 2 deletions
|
|
@ -257,7 +257,7 @@ async def run_askpass(askpass_env: list[str], key: AskpassKey, host: str|None=No
|
|||
return ret
|
||||
return None
|
||||
|
||||
async def run_sudo(cmd: list[str], mod_env: dict[str, str] = {}, opts: list[str]=[], interactive: bool=True):
|
||||
async def run_sudo(cmd: list[str], mod_env: dict[str, str] = {}, opts: list[str]=[], interactive: bool=True, verbose=True):
|
||||
env: dict[str, str]|None = None
|
||||
cmd_input: str|None = None
|
||||
if mod_env:
|
||||
|
|
@ -272,7 +272,7 @@ async def run_sudo(cmd: list[str], mod_env: dict[str, str] = {}, opts: list[str]
|
|||
cmdline.extend(cmd)
|
||||
if interactive:
|
||||
cmd_input = "mode:interactive"
|
||||
stdout, stderr = await run_cmd(*cmdline, throw=True, verbose=True, env=env, cmd_input=cmd_input)
|
||||
stdout, stderr = await run_cmd(*cmdline, throw=True, verbose=verbose, env=env, cmd_input=cmd_input)
|
||||
return stdout, stderr
|
||||
|
||||
async def get_username(args: Namespace|None=None, url: str|None=None, askpass_env: list[str]=[]) -> str: # export
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue