Skip to main content

run

Function run 

Source
pub fn run(
    source: &str,
    bin: Option<String>,
    args: &[String],
    verbose: bool,
) -> Result<()>
Expand description

Runs the ‘exec’ command.

Temporarily installs a package if necessary and executes a binary from it. Ephemeral packages are cleaned up after execution.

§Panics

This function may panic if internal mutexes are poisoned.

§Errors

Returns an error if:

  • Package resolution fails.
  • Installation of temporary packages fails.
  • Execution of the binary fails.
  • Cleanup of ephemeral packages fails.