MCPcopy Create free account
hub / github.com/Qovery/engine / run_version_command_for

Function run_version_command_for

lib-engine/src/cmd/command.rs:390–398  ·  view source on GitHub ↗

return the output of "binary_name" --version

(binary_name: &str)

Source from the content-addressed store, hash-verified

388
389// return the output of "binary_name" --version
390pub fn run_version_command_for(binary_name: &str) -> String {
391 let mut output_from_cmd = String::new();
392 let mut cmd = QoveryCommand::new(binary_name, &["--version"], Default::default());
393 let _ = cmd.exec_with_output(&mut |r_out| output_from_cmd.push_str(&r_out), &mut |r_err| {
394 error!("Error executing {}: {}", binary_name, r_err)
395 });
396
397 output_from_cmd
398}
399
400pub fn does_binary_exist<S>(binary: S) -> bool
401where

Callers 2

check_versions_fromFunction · 0.85

Calls 1

exec_with_outputMethod · 0.45

Tested by 1