shellcheck fixes

This commit is contained in:
Jörg Thalheim 2020-04-01 14:48:31 +01:00
parent 6b4c1f64f7
commit e7fce0da51
No known key found for this signature in database
GPG key ID: 003F2096411B5F92

View file

@ -43,7 +43,7 @@ use_nix() {
log_status using cached derivation
fi
local term_backup=$TERM path_backup=$PATH
if [[ ! -z ${TMPDIR+x} ]]; then
if [[ -n ${TMPDIR+x} ]]; then
local tmp_backup=$TMPDIR
fi
@ -54,7 +54,7 @@ use_nix() {
read -r cache_content < "$cache"
eval "$cache_content"
export PATH=$PATH:$path_backup TERM=$term_backup
if [[ ! -z ${tmp_backup+x} ]]; then
if [[ -n ${tmp_backup+x} ]]; then
export TMPDIR=${tmp_backup}
else
unset TMPDIR
@ -62,14 +62,14 @@ use_nix() {
# `nix-shell --pure` sets invalid ssl certificate paths
if [[ "${SSL_CERT_FILE:-}" = /no-cert-file.crt ]]; then
if [[ ! -z ${impure_ssl_cert_file+x} ]]; then
if [[ -n ${impure_ssl_cert_file+x} ]]; then
export SSL_CERT_FILE=${impure_ssl_cert_file}
else
unset SSL_CERT_FILE
fi
fi
if [[ "${NIX_SSL_CERT_FILE:-}" = /no-cert-file.crt ]]; then
if [[ ! -z ${impure_nix_ssl_cert_file+x} ]]; then
if [[ -n ${impure_nix_ssl_cert_file+x} ]]; then
export NIX_SSL_CERT_FILE=${impure_nix_ssl_cert_file}
else
unset NIX_SSL_CERT_FILE