From 2adf25dcaf8d8c66124c5b76b8a41ae228a7bb02 Mon Sep 17 00:00:00 2001 From: Sean Molenaar Date: Sat, 13 Jul 2024 17:12:05 +0200 Subject: [PATCH] feat: do not use existing sudo authentication in brew commands --- bin/brew | 6 ++++++ 1 file changed, 6 insertions(+) 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 }