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,
)
| 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 { |
nothing calls this directly
no outgoing calls
no test coverage detected