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
Enums§
- Shell
Quoting Style - Quoting dialect of the shell that will run a rebuilt command line.
Functions§
- build_
command_ string - Rebuild a shell command line from the argv the user typed, for the host shell (issue #164).
- build_
command_ string_ with - Rebuild a shell command line from the argv the user typed, for a given shell dialect.
- build_
display_ command - Build a display string that shows the argument boundaries the user typed (issues #91, #164).
- build_
docker_ runtime_ args - Build the extra
docker runarguments contributed by runtime options (–privileged, –init, –env/-e, –volume/-v, –mount, –network, –network-alias, resource limits) and the START_* execution identity. - build_
shell_ with_ args_ cmd_ args - Preserve the script word and all positional argv separately (#202).
- command_
name - First word of a command line, used for failure reports and log headers.
- 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
- 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 - True if command is a bare shell invocation (no -c); avoids bash-inside-bash (issue #84).
- is_
shell_ invocation_ with_ args - True if command is a shell invocation with -c (e.g.
bash -i -c "cmd"); avoids double-wrapping (issue #91). - quote_
shell_ arg - Quote one argv element for the host shell (issue #164).
- quote_
shell_ arg_ with - Quote one argv element so the target shell parses it back as exactly that element (issue #164).
- 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
- split_
shell_ words - Split a command line into shell words for the host shell dialect.
- split_
shell_ words_ with - Split a command line into shell words, reversing
quote_shell_arg_withfor the same dialect: a POSIX shell escapes with a backslash, PowerShell has no backslash escape (it is a path separator) and writes a literal quote as a doubled one. - to_
shell_ words - Split a command into words, falling back to whitespace splitting when quoting is unbalanced.
- wrap_
command_ with_ user - Wrap command with sudo -u if user option is specified