zerobrew is serving as a bad citizen by insisting on setting these widely used environment variables.
|
r#" |
|
# zerobrew |
|
export ZEROBREW_DIR={zerobrew_dir} |
|
export ZEROBREW_BIN={zerobrew_bin} |
|
export ZEROBREW_ROOT={root} |
|
export ZEROBREW_PREFIX={prefix} |
|
export PKG_CONFIG_PATH="$ZEROBREW_PREFIX/lib/pkgconfig:${{PKG_CONFIG_PATH:-}}" |
|
|
|
# SSL/TLS certificates (only if ca-certificates is installed) |
|
if [ -z "${{CURL_CA_BUNDLE:-}}" ] || [ -z "${{SSL_CERT_FILE:-}}" ]; then |
|
if [ -f "$ZEROBREW_PREFIX/opt/ca-certificates/share/ca-certificates/cacert.pem" ]; then |
|
[ -z "${{CURL_CA_BUNDLE:-}}" ] && export CURL_CA_BUNDLE="$ZEROBREW_PREFIX/opt/ca-certificates/share/ca-certificates/cacert.pem" |
|
[ -z "${{SSL_CERT_FILE:-}}" ] && export SSL_CERT_FILE="$ZEROBREW_PREFIX/opt/ca-certificates/share/ca-certificates/cacert.pem" |
|
elif [ -f "$ZEROBREW_PREFIX/etc/ca-certificates/cacert.pem" ]; then |
|
[ -z "${{CURL_CA_BUNDLE:-}}" ] && export CURL_CA_BUNDLE="$ZEROBREW_PREFIX/etc/ca-certificates/cacert.pem" |
|
[ -z "${{SSL_CERT_FILE:-}}" ] && export SSL_CERT_FILE="$ZEROBREW_PREFIX/etc/ca-certificates/cacert.pem" |
|
elif [ -f "$ZEROBREW_PREFIX/etc/openssl/cert.pem" ]; then |
|
[ -z "${{CURL_CA_BUNDLE:-}}" ] && export CURL_CA_BUNDLE="$ZEROBREW_PREFIX/etc/openssl/cert.pem" |
|
[ -z "${{SSL_CERT_FILE:-}}" ] && export SSL_CERT_FILE="$ZEROBREW_PREFIX/etc/openssl/cert.pem" |
|
elif [ -f "$ZEROBREW_PREFIX/share/ca-certificates/cacert.pem" ]; then |
|
[ -z "${{CURL_CA_BUNDLE:-}}" ] && export CURL_CA_BUNDLE="$ZEROBREW_PREFIX/share/ca-certificates/cacert.pem" |
|
[ -z "${{SSL_CERT_FILE:-}}" ] && export SSL_CERT_FILE="$ZEROBREW_PREFIX/share/ca-certificates/cacert.pem" |
|
fi |
|
fi |
|
|
|
if [ -z "${{SSL_CERT_DIR:-}}" ]; then |
|
if [ -d "$ZEROBREW_PREFIX/etc/ca-certificates" ]; then |
|
export SSL_CERT_DIR="$ZEROBREW_PREFIX/etc/ca-certificates" |
|
elif [ -d "$ZEROBREW_PREFIX/etc/openssl/certs" ]; then |
|
export SSL_CERT_DIR="$ZEROBREW_PREFIX/etc/openssl/certs" |
|
elif [ -d "$ZEROBREW_PREFIX/share/ca-certificates" ]; then |
|
export SSL_CERT_DIR="$ZEROBREW_PREFIX/share/ca-certificates" |
|
fi |
|
fi |
|
|
|
# Helper function to safely append to PATH |
|
_zb_path_append() {{ |
|
local argpath="$1" |
|
case ":${{PATH}}:" in |
|
*:"$argpath":*) ;; |
|
*) export PATH="$argpath:$PATH" ;; |
|
esac; |
|
}} |
|
|
|
_zb_path_append "$ZEROBREW_BIN" |
|
_zb_path_append "$ZEROBREW_PREFIX/bin" |
|
"#, |
I don't have zerobrew-managed ca-certificates installed, don't want, and don't need.
A considerate developer or agent, would create a ZEROBREW_SSL_CERT_FILE or ZEROBREW_SSL_CERT_DIR env vars to use
I re-attempted to install from tap, which left me with v0.1.1, already filed #386 here and there lucasgelfond/homebrew-zerobrew#1.
zerobrew is serving as a bad citizen by insisting on setting these widely used environment variables.
zerobrew/zb_cli/src/init.rs
Lines 301 to 347 in 8d9af90
I don't have zerobrew-managed ca-certificates installed, don't want, and don't need.
A considerate developer or agent, would create a
ZEROBREW_SSL_CERT_FILEorZEROBREW_SSL_CERT_DIRenv vars to useI re-attempted to install from tap, which left me with
v0.1.1, already filed #386 here and there lucasgelfond/homebrew-zerobrew#1.