fn uninstall_handler()

in proxy_agent_extension/src/handler_main.rs [194:228]


fn uninstall_handler() {
    logger::write("Uninstalling Handler".to_string());
    if !update_tag_file_exists() {
        let setup_tool = misc_helpers::path_to_string(&common::setup_tool_exe_path());
        match Command::new(setup_tool).arg("uninstall").output() {
            Ok(output) => {
                match str::from_utf8(&output.stdout) {
                    Ok(output_string) => {
                        logger::write(format!(
                            "uninstalling GuestProxyAgent, output: {}",
                            output_string
                        ));
                    }
                    Err(e) => {
                        logger::write(format!("error in uninstalling GuestProxyAgent: {:?}", e));
                    }
                }
                match str::from_utf8(&output.stderr) {
                    Ok(output_string) => {
                        logger::write(format!(
                            "output stderr for uninstall GuestProxyAgent: {}",
                            output_string
                        ));
                    }
                    Err(e) => {
                        logger::write(format!("error in uninstalling GuestProxyAgent: {:?}", e));
                    }
                }
            }
            Err(e) => {
                logger::write(format!("error in uninstalling GuestProxyAgent: {:?}", e));
            }
        }
    }
}