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

Function shell_command_from_args

src/cli/run/mod.rs:285–290  ·  view source on GitHub ↗

Build the shell command run for `codspeed run -- `. A single argument is kept as raw shell (e.g. `"cargo bench && echo done"`). Multiple arguments were already split by the user's shell, so each one is quoted to run exactly as given.

(args: &[String])

Source from the content-addressed store, hash-verified

283/// A single argument is kept as raw shell (e.g. `"cargo bench && echo done"`). Multiple arguments
284/// were already split by the user's shell, so each one is quoted to run exactly as given.
285fn shell_command_from_args(args: &[String]) -> String {
286 match args {
287 [single] => single.clone(),
288 parts => shell_words::join(parts),
289 }
290}
291
292// We have to implement this manually, because deriving the trait makes the CLI values `git-hub`
293// and `git-lab`

Callers 1

runFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected