Expand description
Isolation Runners for start-command
Provides execution of commands in various isolated environments:
- screen: GNU Screen terminal multiplexer
- tmux: tmux terminal multiplexer
- docker: Docker containers
- ssh: Remote SSH execution
Re-exports§
pub use self::isolation_screen::get_screen_version;pub use self::isolation_screen::supports_logfile_option;pub use self::isolation_log::append_log_file;pub use self::isolation_log::create_log_header;pub use self::isolation_log::create_log_path;pub use self::isolation_log::create_log_path_for_execution;pub use self::isolation_log::generate_log_filename;pub use self::isolation_log::get_default_docker_image;pub use self::isolation_log::get_log_dir;pub use self::isolation_log::get_temp_dir;pub use self::isolation_log::get_temp_root;pub use self::isolation_log::get_timestamp;pub use self::isolation_log::write_log_file;pub use self::isolation_log::LogHeaderParams;
Modules§
- isolation_
log - Logging and utility functions for isolation runners
- isolation_
screen - Screen-specific isolation helpers extracted from isolation.rs
Structs§
- Isolation
Options - Options for isolation
- Isolation
Result - Result of an isolation run
Functions§
- build_
shell_ with_ args_ cmd_ args - Build argv for a shell-with-c command; everything after -c is joined as one argument.
Reverses the join(’ ’) that collapsed the original quoted argument.
Used to pass
bash -i -c "nvm --version"directly as argv (issue #91 fix). - detect_
shell_ in_ environment - Detect the best available shell in an isolation environment (docker/ssh) Tries shells in order: bash, zsh, sh Returns the shell path to use
- docker_
image_ exists - Check if a Docker image exists locally
- docker_
pull_ image - Pull a Docker image with output streaming Returns (success, output) tuple
- get_
shell - Get the shell to use for command execution
- has_tty
- Check if the current process has a TTY attached
- is_
command_ available - Check if a command is available on the system
- is_
interactive_ shell_ command - Returns true if command is a bare interactive shell invocation (no -c flag). Used to avoid double-wrapping shells in isolation environments (issue #84).
- is_
shell_ invocation_ with_ args - Returns true if command is a shell invocation that includes -c (e.g.
bash -i -c "cmd"). Used to pass such commands directly without double-wrapping (issue #91). - run_
as_ isolated_ user - Run command as an isolated user (without isolation backend)
- run_
in_ docker - Run command in Docker container
- run_
in_ screen - Run command in GNU Screen
- run_
in_ ssh - Run command over SSH
- run_
in_ tmux - Run command in tmux
- run_
isolated - Run command in the specified isolation backend
- wrap_
command_ with_ user - Wrap command with sudo -u if user option is specified