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

Function helm_exec_with_output

lib-engine/src/cmd/helm.rs:1919–1938  ·  view source on GitHub ↗
(
    args: &[&str],
    envs: &[(&str, &str)],
    stdout_output: &mut STDOUT,
    stderr_output: &mut STDERR,
    cmd_killer: &CommandKiller,
)

Source from the content-addressed store, hash-verified

1917}
1918
1919fn helm_exec_with_output<STDOUT, STDERR>(
1920 args: &[&str],
1921 envs: &[(&str, &str)],
1922 stdout_output: &mut STDOUT,
1923 stderr_output: &mut STDERR,
1924 cmd_killer: &CommandKiller,
1925) -> Result<(), CommandError>
1926where
1927 STDOUT: FnMut(String),
1928 STDERR: FnMut(String),
1929{
1930 // Note: Helm CLI use spf13/cobra lib for the CLI; One function is mainly used to return an error if a command failed.
1931 // Helm returns an error each time a command does not succeed as they want. Which leads to handling error with status code 1
1932 // It means that the command successfully ran, but it didn't terminate as expected
1933 let mut cmd = QoveryCommand::new("helm", args, envs);
1934 match cmd.exec_with_abort(stdout_output, stderr_output, cmd_killer) {
1935 Err(err) => Err(err),
1936 _ => Ok(()),
1937 }
1938}
1939
1940pub fn to_engine_error(event_details: &EventDetails, error: HelmError) -> EngineError {
1941 EngineError::new_helm_error(event_details.clone(), error)

Callers 15

check_release_existMethod · 0.85
rollbackMethod · 0.85
uninstallMethod · 0.85
list_releaseMethod · 0.85
helm_pullMethod · 0.85
download_https_chartMethod · 0.85
upgrade_diffMethod · 0.85
upgradeMethod · 0.85
dependency_buildMethod · 0.85
get_repo_dependenciesMethod · 0.85
helm_add_repoMethod · 0.85

Calls 1

exec_with_abortMethod · 0.45

Tested by 1

check_versionFunction · 0.68