MCPcopy Create free account
hub / github.com/NthTensor/Forte / new

Method new

ci/src/prepare.rs:70–81  ·  view source on GitHub ↗

Creates a new [`PreparedCommand`] from a [`Cmd`] and a failure message. The other fields of [`PreparedCommand`] are filled in with their default values. For more information about creating a [`Cmd`], please see the [`cmd!`](xshell::cmd) macro. [`Cmd`]: xshell::Cmd

(
        command: xshell::Cmd<'a>,
        failure_message: &'static str,
    )

Source from the content-addressed store, hash-verified

68 ///
69 /// [`Cmd`]: xshell::Cmd
70 pub fn new<T: argh::SubCommand>(
71 command: xshell::Cmd<'a>,
72 failure_message: &'static str,
73 ) -> Self {
74 Self {
75 command,
76 name: T::COMMAND.name,
77 failure_message,
78 subdir: None,
79 env_vars: vec![],
80 }
81 }
82
83 /// A builder that overwrites the current sub-directory with a new value.
84 pub fn with_subdir(mut self, subdir: &'static str) -> Self {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected