Slightly improve check for pip in httpbin script

Using "-m pip" results in an unwanted usage message from pip, so use
"-c 'import pip'" instead.
This commit is contained in:
Vadim Zeitlin
2021-06-27 18:42:37 +01:00
parent 0eca5b6846
commit 938a0dd919

View File

@@ -44,7 +44,7 @@ httpbin_launch() {
esac
# Ensure that we have at least some version of pip.
if ! python3 -m pip; then
if ! python3 -c 'import pip'; then
sudo apt-get -q -o=Dpkg::Use-Pty=0 install python3-pip
fi