Enhanced logic for setting SSL_CERT_FILE and REQUESTS_CA_BUNDLE
This commit is contained in:
parent
ae8dd3841a
commit
5df352de06
1 changed files with 11 additions and 13 deletions
|
@ -152,12 +152,6 @@ fi
|
|||
# BW_CLIENTID client_id
|
||||
# BW_CLIENTSECRET
|
||||
|
||||
### CA Certificate
|
||||
# Used by Python, cURL, and other tools
|
||||
export CERT_PATH="$HOME/.local/etc/ssl/curl/cacert.pem"
|
||||
export SSL_CERT_FILE="$CERT_PATH"
|
||||
export REQUESTS_CA_BUNDLE="$CERT_PATH"
|
||||
|
||||
### Cheat
|
||||
if command -v fzf > /dev/null; then
|
||||
export CHEAT_USE_FZF=true
|
||||
|
@ -358,13 +352,17 @@ export PATH="$PATH:$PNPM_HOME"
|
|||
# Specify location of the default Prettierd configuration
|
||||
# export PRETTIERD_DEFAULT_CONFIG=""
|
||||
|
||||
### Python
|
||||
# Replaced by certificate retrieved from the cURL website
|
||||
# if command -v python3 > /dev/null; then
|
||||
# export CERT_PATH="$(python3 -m certifi)"
|
||||
# export SSL_CERT_FILE="$CERT_PATH"
|
||||
# export REQUESTS_CA_BUNDLE="$CERT_PATH"
|
||||
# fi
|
||||
### Python / CA Certificate
|
||||
# Used by Python, cURL, and other tools
|
||||
if [ -f "$HOME/.local/etc/ssl/curl/cacert.pem" ]; then
|
||||
export CERT_PATH="$HOME/.local/etc/ssl/curl/cacert.pem"
|
||||
export SSL_CERT_FILE="$CERT_PATH"
|
||||
export REQUESTS_CA_BUNDLE="$CERT_PATH"
|
||||
elif command -v python3 > /dev/null; then
|
||||
export CERT_PATH="$(python3 -m certifi)" || export CERT_PATH="$(python -m certifi)"
|
||||
export SSL_CERT_FILE="$CERT_PATH"
|
||||
export REQUESTS_CA_BUNDLE="$CERT_PATH"
|
||||
fi
|
||||
|
||||
### Readline
|
||||
export INPUTRC="${XDG_CONFIG_HOME:-$HOME/.config}/readline/inputrc"
|
||||
|
|
Loading…
Reference in a new issue