pub struct ScriptOptions {
    pub runner: Option<String>,
    pub working_directory: Option<PathBuf>,
    pub input_redirection: IoOptions,
    pub output_redirection: IoOptions,
    pub exit_on_error: bool,
    pub print_commands: bool,
    pub env_vars: Option<HashMap<String, String>>,
}
Expand description

Options available for invoking the script

Fields

runner: Option<String>

Defines the requested runner (defaults to cmd in windows and sh for other platforms)

working_directory: Option<PathBuf>

The working directory of the invocation

input_redirection: IoOptions

Default is IoOptions::Inherit

output_redirection: IoOptions

Default is IoOptions::Pipe (only pipe enables to capture the output)

exit_on_error: bool

Sets -e flag. Will exit on any error while running the script (not available for windows)

print_commands: bool

Sets -x flag for printing each script command before invocation (not available for windows)

env_vars: Option<HashMap<String, String>>

Environment environment variables to add before invocation

Implementations

Returns new instance

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

Uses borrowed data to replace owned data, usually by cloning. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.