fix: pipx command not found while normal site-packages is not writeable

pull/1012/head
michelia 1 year ago committed by Lawrence Li
parent 3053fdbb7d
commit 8b436647cb

@ -231,6 +231,9 @@ check_python_tools() {
fi
fi
USER_BASE_BIN=$(python3 -m site --user-base)/bin
export PATH="$USER_BASE_BIN:$PATH"
if ! command -v pipx > /dev/null 2>&1; then
info "Pipx could not be found. Attempting to install..."
if [ -z "$PYTHON_EXTERNALLY_MANAGED" ]; then
@ -249,10 +252,7 @@ check_python_tools() {
check_python_tools
fi
USER_BASE_BIN=$(python3 -m site --user-base)/bin
export PATH="$USER_BASE_BIN:$PATH"
pipx ensurepath --force
PIPX_BIN_DIR=$(pipx environment --value PIPX_BIN_DIR)
export PATH="$PIPX_BIN_DIR:$PATH"
}

@ -1 +1 @@
c22bbb47fa85474c5270c843361a71851cb50ae2f96b01f3635fdfaf7543a649 install.sh
4a96904b271f015dd6ce68eb4baca8dbeb8076fdfd9b020a436beef7f08eb668 install.sh

Loading…
Cancel
Save