Skip to content

Commit

Permalink
Merge pull request #4074 from bukzor/patch-1
Browse files Browse the repository at this point in the history
get-stack: check deps before sudo
  • Loading branch information
borsboom authored Jun 25, 2018
2 parents 466da22 + 4a8d4de commit b9bc6a6
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion etc/scripts/get-stack.sh
Original file line number Diff line number Diff line change
Expand Up @@ -568,7 +568,9 @@ try_install_pkgs() {

# Install packages using apt-get
apt_get_install_pkgs() {
if ! sudocmd apt-get install -y ${QUIET:+-qq} "$@"; then
if dpkg-query -W "$@" > /dev/null; then
info "Already installed!"
elif ! sudocmd apt-get install -y ${QUIET:+-qq} "$@"; then
die "Installing apt packages failed. Please run 'apt-get update' and try again."
fi
}
Expand Down

1 comment on commit b9bc6a6

@bukzor
Copy link
Contributor

@bukzor bukzor commented on b9bc6a6 Jun 25, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

Please sign in to comment.