Prefix package installation commands with sudo
This file calls either rpm, dpkg or apt to install a YAML module for python. This change removes the need for this file to be run as root. Change-Id: I77590d24e82f0ced69db97ef946fa7202d1f0a7a
This commit is contained in:
parent
3f5af67768
commit
19b9cecb77
@ -21,9 +21,9 @@ test -t 1 && test -t 0 && DEFAULT_TERM_OPTS='-it'
|
|||||||
|
|
||||||
# Python YAML module required to read versions.yaml
|
# Python YAML module required to read versions.yaml
|
||||||
if grep -iq suse /etc/os-release; then
|
if grep -iq suse /etc/os-release; then
|
||||||
rpm -q python3-pyaml --quiet || zypper --non-interactive install python3-pyaml
|
sudo rpm -q python3-pyaml --quiet || sudo zypper --non-interactive install python3-pyaml
|
||||||
else
|
else
|
||||||
dpkg -s python3-yaml &> /dev/null || apt -y install python3-yaml
|
sudo dpkg -s python3-yaml &> /dev/null || sudo apt -y install python3-yaml
|
||||||
fi
|
fi
|
||||||
|
|
||||||
ENV_FILE=$(mktemp)
|
ENV_FILE=$(mktemp)
|
||||||
|
Loading…
Reference in New Issue
Block a user