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

Function self_exe

src/cli/mod.rs:133–140  ·  view source on GitHub ↗

The executable that internal subcommands are re-invoked through.

()

Source from the content-addressed store, hash-verified

131
132/// The executable that internal subcommands are re-invoked through.
133pub(crate) fn self_exe() -> Result<PathBuf> {
134 #[cfg(test)]
135 if let Some(path) = std::env::var_os(SELF_EXE_ENV_VAR) {
136 return Ok(PathBuf::from(path));
137 }
138
139 std::env::current_exe().context("failed to resolve current executable for internal subcommand")
140}
141
142impl InternalCommands {
143 /// Build a [`CommandBuilder`] that re-execs the current binary into this

Callers 3

get_command_builderMethod · 0.85
memtrack_pathFunction · 0.85
get_valgrind_argsFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected