Skip to content

Commit

Permalink
Add a proxy-def as appropriate
Browse files Browse the repository at this point in the history
Closes plus3it#86
  • Loading branch information
ferricoxide committed May 31, 2023
1 parent 6d36d7a commit b23cd3b
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions AzureUtils.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ set -eu -o pipefail
PROGNAME=$(basename "$0")
CHROOTMNT="${CHROOT:-/mnt/ec2-root}"
DEBUG="${DEBUG:-UNDEF}"
DNF_PROXY="${HTTP_PROXY:-}"

# Make interactive-execution more-verbose unless explicitly told not to
if [[ $( tty -s ) -eq 0 ]] && [[ ${DEBUG:-} == "UNDEF" ]]
Expand Down Expand Up @@ -46,9 +47,12 @@ function AzCliSetup {
if [[ $( rpm -q --quiet azure-cli )$? -ne 0 ]]
then
err_exit "Attempting to install azure-cli from Yum repo" NONE
dnf --installroot="${CHROOTMNT}" \
install --assumeyes --quiet azure-cli || \
(
export ALL_PROXY="${DNF_PROXY}"
dnf --installroot="${CHROOTMNT}" \
install --assumeyes --quiet azure-cli || \
err_exit "WARNING: Azure CLI not installed" NONE
)
err_exit "Success!" NONE
fi
}
Expand Down

0 comments on commit b23cd3b

Please sign in to comment.