MCPcopy Create free account
hub / github.com/CodSpeedHQ/codspeed / get_command_builder

Method get_command_builder

src/cli/mod.rs:118–129  ·  view source on GitHub ↗

Build a [`CommandBuilder`] that re-execs the current binary into this internal subcommand. Each variant owns its own arg layout.

(&self)

Source from the content-addressed store, hash-verified

116 /// Build a [`CommandBuilder`] that re-execs the current binary into this
117 /// internal subcommand. Each variant owns its own arg layout.
118 pub fn get_command_builder(&self) -> Result<CommandBuilder> {
119 let current_exe = std::env::current_exe()
120 .context("failed to resolve current executable for internal subcommand")?;
121 let mut builder = CommandBuilder::new(current_exe);
122 match self {
123 InternalCommands::Samply(args) => {
124 builder.arg("samply");
125 builder.args(args.args.iter().cloned());
126 }
127 }
128 Ok(builder)
129 }
130}
131
132pub async fn run() -> Result<()> {

Callers 1

wrap_commandMethod · 0.80

Calls 2

argMethod · 0.80
argsMethod · 0.80

Tested by

no test coverage detected