ensure-tox: improve pip detection
Fixed issues failing to install tox on python3 only systems which have only pip3 executable and not the pip one. Needed-By: https://review.rdoproject.org/r/#/c/24584/ Change-Id: Ie50928c9b782ea84db916bb1441567e1206ff466
This commit is contained in:
parent
fc9d36ffe4
commit
2410119ac9
@ -1,2 +1,9 @@
|
|||||||
- name: Ensure tox is installed
|
- name: Ensure tox is installed
|
||||||
shell: type tox || pip install --user tox
|
shell: |
|
||||||
|
set -euo pipefail
|
||||||
|
PIP=$(command -v pip pip3 | head -n1)
|
||||||
|
type tox || $PIP install --user tox
|
||||||
|
args:
|
||||||
|
executable: /bin/bash
|
||||||
|
register: result
|
||||||
|
changed_when: "'Successfully installed' in result.stdout"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user