Skip to content

Commit

Permalink
Disable pip version check
Browse files Browse the repository at this point in the history
  • Loading branch information
mboersma committed Oct 19, 2022
1 parent 7fe5422 commit 235bfe8
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 2 deletions.
5 changes: 4 additions & 1 deletion images/capi/hack/ensure-ansible-windows.sh
Original file line number Diff line number Diff line change
Expand Up @@ -27,14 +27,17 @@ _version="0.4.2"
if [[ ${HOSTOS} == "darwin" ]]; then
echo "IMPORTANT: Winrm connection plugin for Ansible on MacOS causes connection issues."
echo "See https://docs.ansible.com/ansible/latest/user_guide/windows_winrm.html#what-is-winrm for more details."
echo "To fix the issue provide the enviroment variable 'no_proxy=*'"
echo "To fix the issue provide the enviroment variable 'no_proxy=*'"
echo "Example call to build Windows images on MacOS: 'no_proxy=* make build-<target>'"
fi

# Change directories to the parent directory of the one in which this
# script is located.
cd "$(dirname "${BASH_SOURCE[0]}")/.."

# Disable pip's version check and root user warning
export PIP_DISABLE_PIP_VERSION_CHECK=1 PIP_ROOT_USER_ACTION=ignore

if pip3 show pywinrm >/dev/null 2>&1; then exit 0; fi

ensure_py3
Expand Down
3 changes: 3 additions & 0 deletions images/capi/hack/ensure-ansible.sh
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,9 @@ _version="2.11.5"
# script is located.
cd "$(dirname "${BASH_SOURCE[0]}")/.."

# Disable pip's version check and root user warning
export PIP_DISABLE_PIP_VERSION_CHECK=1 PIP_ROOT_USER_ACTION=ignore

if ! command -v ansible >/dev/null 2>&1; then
ensure_py3
pip3 install --user "ansible-core==${_version}"
Expand Down
3 changes: 3 additions & 0 deletions images/capi/hack/ensure-azure-cli.sh
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,9 @@ cd "$(dirname "${BASH_SOURCE[0]}")/.."

if command -v az >/dev/null 2>&1; then exit 0; fi

# Disable pip's version check and root user warning
export PIP_DISABLE_PIP_VERSION_CHECK=1 PIP_ROOT_USER_ACTION=ignore

ensure_py3
pip install -U pip setuptools
pip3 install --user "azure-cli==${_version}"
Expand Down
2 changes: 1 addition & 1 deletion images/capi/hack/utils.sh
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ ensure_py3_bin() {
if ! command -v "${1}" >/dev/null 2>&1; then
echo "User's Python3 binary directory must be in \$PATH" 1>&2
echo "Location of package is:" 1>&2
pip3 show ${2:-$1} | grep "Location"
pip3 show --disable-pip-version-check ${2:-$1} | grep "Location"
echo "\$PATH is currently: $PATH" 1>&2
exit 1
fi
Expand Down

0 comments on commit 235bfe8

Please sign in to comment.