diff --git a/bin/brew b/bin/brew index 3d70018d67..c346974a6a 100755 --- a/bin/brew +++ b/bin/brew @@ -36,6 +36,12 @@ then exit 1 fi +# Reset sudo timestamp to avoid running unauthorized sudo commands +if command -v sudo >/dev/null +then + sudo --reset-timestamp +fi + quiet_cd() { CDPATH='' cd -- "$@" &>/dev/null || return }