Skip to content

Commit

Permalink
Fixing CURL_CA_BUNDLE setting bug
Browse files Browse the repository at this point in the history
  • Loading branch information
kvg committed Jan 23, 2024
1 parent 2a1788c commit 575837b
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
2 changes: 1 addition & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 1 addition & 3 deletions src/storage.rs
Original file line number Diff line number Diff line change
Expand Up @@ -44,9 +44,7 @@ pub fn local_get_file_update_time(path: &PathBuf) -> std::io::Result<DateTime<Ut

pub fn local_guess_curl_ca_bundle() {
// See https://github.com/rust-bio/rust-htslib/issues/404

// Set if CURL_CA_BUNDLE is unset or empty
if std::env::var("CURL_CA_BUNDLE").map_or(true, |v| v.is_empty()) {
if std::env::var("CURL_CA_BUNDLE").is_err() {
std::env::set_var("CURL_CA_BUNDLE", "/etc/ssl/certs/ca-certificates.crt");
}
}
Expand Down

0 comments on commit 575837b

Please sign in to comment.