This commit is contained in:
Howard Wu 2022-09-06 16:14:54 +08:00
parent dca2264212
commit 6d9f1e8754

View File

@ -86,9 +86,9 @@ check_package_manager
if [ -n "${NEED_INSTALL[*]}" ]; then if [ -n "${NEED_INSTALL[*]}" ]; then
if [ -z "$PM" ]; then if [ -z "$PM" ]; then
echo "Unable to determine package manager: unknown distribution" echo "Unable to determine package manager: unknown distribution"
exit 1 abort
else else
if ! sudo "$PM" "${UPDATE_OPTION[@]}" && sudo "$PM" "${INSTALL_OPTION[@]}" "${NEED_INSTALL[@]}"; then abort; fi if ! (sudo "$PM" "${UPDATE_OPTION[@]}" && sudo "$PM" "${INSTALL_OPTION[@]}" "${NEED_INSTALL[@]}") then abort; fi
fi fi
fi fi
pip list --disable-pip-version-check | grep -E "^requests " >/dev/null 2>&1 || python3 -m pip install requests pip list --disable-pip-version-check | grep -E "^requests " >/dev/null 2>&1 || python3 -m pip install requests