Skip to content

Commit

Permalink
Merge pull request #2271 from openziti/fix-linux-install-script-yes
Browse files Browse the repository at this point in the history
only add params if defined
  • Loading branch information
qrkourier committed Jul 30, 2024
2 parents 7886bc2 + 4000179 commit beebc1b
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions dist/dist-packages/linux/install.bash
Original file line number Diff line number Diff line change
Expand Up @@ -123,11 +123,13 @@ installDebian(){
fi

apt-get update
# allow downgrades if any versions are pinned with '='
typeset -a APT_ARGS=(install --yes)
# allow dangerous downgrades if a version is pinned with '='
if [[ "${*}" =~ = ]]; then
ALLOW_DOWNGRADES='--allow-downgrades'
APT_ARGS+=(--allow-downgrades)
fi
apt-get install --yes "${ALLOW_DOWNGRADES:-}" "$@"
# shellcheck disable=SC2068
apt-get ${APT_ARGS[@]} "$@"
for PKG in "$@"; do
apt-cache show "${PKG%=*}=$(dpkg-query -W -f='${Version}' "${PKG%=*}")"
done
Expand Down

0 comments on commit beebc1b

Please sign in to comment.