#[non_exhaustive]pub struct ShellCommand {
pub program: String,
pub args: Vec<String>,
pub cwd: PathBuf,
pub env: Vec<(String, String)>,
}Expand description
The command that opens an interactive console into a machine (a shell in a container, vagrant ssh, an SSH login): the runner builds it (it alone knows the runtime: the Compose project and
files, the Vagrant define, the address and user a module gives), the embedder runs it in its
own terminal. Addresses the machine by service or define name, or by the address the run gives
it, never a guessed container.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.program: StringThe program to run (docker, vagrant, ssh).
args: Vec<String>Its arguments.
cwd: PathBufThe folder to run it in (the run’s folder).
env: Vec<(String, String)>Variables to run it with, besides the embedder’s own (a Vagrant run’s state folder,
VAGRANT_DOTFILE_PATH, without which Vagrant doesn’t find the VM; its forwarded ports).
Empty for a Compose service on this computer and for an SSH login.
Implementations§
Source§impl ShellCommand
impl ShellCommand
Sourcepub fn new(
program: impl Into<String>,
args: impl IntoIterator<Item = impl Into<String>>,
cwd: impl Into<PathBuf>,
) -> ShellCommand
pub fn new( program: impl Into<String>, args: impl IntoIterator<Item = impl Into<String>>, cwd: impl Into<PathBuf>, ) -> ShellCommand
program with args, run in cwd, with no variable of its own.