This commit is contained in:
2022-09-24 10:37:17 +00:00
committed by GitHub
parent 7774b1d4e7
commit a47e3da2ed

View File

@@ -127,18 +127,21 @@ impl Main {
None => {}
}
get_helper().update(cmd.clone(), self.settings.as_ref().unwrap().clone());
#[cfg(target_os = "windows")]
{
match std::env::var("SSL_CERT_FILE") {
Ok(_) => {}
Err(_) => {
let mut cert = utils::get_exe_path_else_current();
cert.set_file_name("cert.pem");
match std::env::var("SSL_CERT_FILE") {
Ok(s) => {
if s.len() == 0 || std::path::Path::new(&s).exists() {
let cert = utils::get_exe_path_else_current().join("cert.pem");
if cert.exists() {
std::env::set_var("SSL_CERT_FILE", cert);
}
}
}
Err(_) => {
let cert = utils::get_exe_path_else_current().join("cert.pem");
if cert.exists() {
std::env::set_var("SSL_CERT_FILE", cert);
}
}
}
match cmd.cmd {
Command::Config => {