Skip to content

Commit

Permalink
Merge pull request #17 from nix-community/ssl-cert
Browse files Browse the repository at this point in the history
  • Loading branch information
Mic92 authored Apr 20, 2020
2 parents 5498c54 + ba30d7f commit f8da3dc
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions direnvrc
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,8 @@ use_nix() {
local tmp_backup=$TMPDIR
fi

local impure_ssl_cert_file=${SSL_CERT_FILE:-}
local impure_nix_ssl_cert_file=${NIX_SSL_CERT_FILE:-}
local impure_ssl_cert_file=${SSL_CERT_FILE:-__UNSET__}
local impure_nix_ssl_cert_file=${NIX_SSL_CERT_FILE:-__UNSET__}

log_status eval "$cache"
read -r cache_content < "$cache"
Expand All @@ -62,17 +62,17 @@ use_nix() {

# `nix-shell --pure` sets invalid ssl certificate paths
if [[ "${SSL_CERT_FILE:-}" = /no-cert-file.crt ]]; then
if [[ -n ${impure_ssl_cert_file+x} ]]; then
export SSL_CERT_FILE=${impure_ssl_cert_file}
else
if [[ ${impure_ssl_cert_file} == __UNSET__ ]]; then
unset SSL_CERT_FILE
else
export SSL_CERT_FILE=${impure_ssl_cert_file}
fi
fi
if [[ "${NIX_SSL_CERT_FILE:-}" = /no-cert-file.crt ]]; then
if [[ -n ${impure_nix_ssl_cert_file+x} ]]; then
export NIX_SSL_CERT_FILE=${impure_nix_ssl_cert_file}
else
if [[ ${impure_nix_ssl_cert_file} == __UNSET__ ]]; then
unset NIX_SSL_CERT_FILE
else
export NIX_SSL_CERT_FILE=${impure_nix_ssl_cert_file}
fi
fi

Expand Down

0 comments on commit f8da3dc

Please sign in to comment.