Implement sudo support across terminal environments
- Added support for sudo commands in local, Docker, Singularity, and SSH environments by introducing the `SUDO_PASSWORD` environment variable. - Updated terminal tool configurations in `.env.example` and `cli-config.yaml.example` to document the new sudo functionality. - Enhanced the command execution process to handle sudo commands gracefully, preventing hangs on interactive prompts and providing clear error messages when no password is configured. - Updated `README.md` to include instructions for using sudo support and SSH backend configuration. - Revised `TODO.md` to reflect the completion of the sudo feature and outline future enhancements.
This commit is contained in:
parent
affc4e9a8f
commit
971ed2bbdf
6 changed files with 276 additions and 142 deletions
2
cli.py
2
cli.py
|
|
@ -134,6 +134,8 @@ def load_cli_config() -> Dict[str, Any]:
|
|||
"ssh_user": "TERMINAL_SSH_USER",
|
||||
"ssh_port": "TERMINAL_SSH_PORT",
|
||||
"ssh_key": "TERMINAL_SSH_KEY",
|
||||
# Sudo support (works with all backends)
|
||||
"sudo_password": "SUDO_PASSWORD",
|
||||
}
|
||||
|
||||
# CLI config overrides .env for terminal settings
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue