jw-pkg/src/python/jw/pkg/lib
Jan Lindemann 4274a71c62 lib.util.run_cmd(): Rewrite it to be async
run_cmd() is synchronous. Now that all commands are asynchronous, we
can await it, so rewrite it to be asynchronous, too.

Other changes:

  - Make it return stderr as well in case its needed

  - Drop into a pseuto-tty if
    - cmd_input == "mode:interactive" or
    - cmd_input == "mode:auto" and stdin is a TTY

  - Add argument env, defaulting to None. If it's a dict, it will be
    the environment the command is run in

This entails making all functions using run_cmd() async, too,
including run_curl(), get_username() and get_password().

Signed-off-by: Jan Lindemann <jan@janware.com>
2026-01-28 17:41:40 +01:00
..
App.py lib.Cmd: Add argument "parent" to __init__() 2026-01-28 15:24:24 +01:00
Cmd.py lib.Cmd: Add argument "parent" to __init__() 2026-01-28 15:24:24 +01:00
log.py lib.log: Add module 2026-01-26 17:58:23 +01:00
Makefile jw.pkg.build.lib: Move to jw.pkg.lib 2026-01-26 17:58:23 +01:00
SSHClient.py lib.util.run_cmd(): Rewrite it to be async 2026-01-28 17:41:40 +01:00
Types.py lib.Types: Add module 2026-01-26 17:58:23 +01:00
util.py lib.util.run_cmd(): Rewrite it to be async 2026-01-28 17:41:40 +01:00