llama-stack-mirror/llama_stack/cli
Sébastien Han 239e4aad80
refactor: simplify command execution and remove PTY handling
A PTY is unnecessary for interactive mode since `subprocess.run()`
already inherits the calling terminal’s stdin, stdout, and stderr,
allowing natural interaction. Using a PTY can introduce unwanted
side effects like buffering issues and inconsistent signal
handling. Standard input/output is sufficient for most
interactive programs.

This commit simplifies the command execution by:

1. Removing PTY-based execution in favor of direct subprocess handling
2. Consolidating command execution into a single run_command function
3. Improving error handling with specific subprocess error types
4. Adding proper type hints and documentation
5. Maintaining Ctrl+C handling for graceful interruption

Signed-off-by: Sébastien Han <seb@redhat.com>
2025-03-14 17:52:38 +01:00
..
model fix: Fix pre-commit check (#1628) 2025-03-13 18:57:42 -07:00
scripts API Updates (#73) 2024-09-17 19:51:35 -07:00
stack refactor: simplify command execution and remove PTY handling 2025-03-14 17:52:38 +01:00
__init__.py API Updates (#73) 2024-09-17 19:51:35 -07:00
download.py refactor: move all datetime.now() calls to UTC (#1589) 2025-03-13 15:34:53 -07:00
llama.py fix: Incorrect import path for print_subcommand_description() (#1315) 2025-02-27 18:50:41 -08:00
subcommand.py API Updates (#73) 2024-09-17 19:51:35 -07:00
table.py style: remove prints in codebase (#1146) 2025-02-18 19:41:37 -08:00
verify_download.py style: update verify-download help text (#1134) 2025-02-18 10:15:26 -08:00