mirror of
https://github.com/meeb/tubesync.git
synced 2025-06-23 13:36:35 +00:00
Use --break-system-packages with pip
Unfortunately, both versions of `pip` don't have this flag. Check the version, then add the flag if it is not too old.
This commit is contained in:
parent
66e5192980
commit
1f95b858f2
@ -26,5 +26,13 @@ pip3() {
|
|||||||
warning_message
|
warning_message
|
||||||
test -n "${TUBESYNC_DEBUG}" || exit 1
|
test -n "${TUBESYNC_DEBUG}" || exit 1
|
||||||
|
|
||||||
pip3 install --upgrade --break-system-packages yt-dlp
|
# Use the flag added in 23.0.1, if possible.
|
||||||
|
# https://github.com/pypa/pip/pull/11780
|
||||||
|
break_system_packages='--break-system-packages'
|
||||||
|
pip_version="$(pip3 --version | awk '$1 = "pip" { print $2; exit; }')"
|
||||||
|
if [[ "${pip_version}" < "23.0.1" ]]; then
|
||||||
|
break_system_packages=''
|
||||||
|
fi
|
||||||
|
|
||||||
|
pip3 install --upgrade ${break_system_packages} yt-dlp
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user