mirror of
https://github.com/Homebrew/brew.git
synced 2025-07-14 16:09:03 +08:00
feat: do not use existing sudo authentication in brew commands
This commit is contained in:
parent
f5adff9d90
commit
2adf25dcaf
6
bin/brew
6
bin/brew
@ -36,6 +36,12 @@ then
|
|||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# Reset sudo timestamp to avoid running unauthorized sudo commands
|
||||||
|
if command -v sudo >/dev/null
|
||||||
|
then
|
||||||
|
sudo --reset-timestamp
|
||||||
|
fi
|
||||||
|
|
||||||
quiet_cd() {
|
quiet_cd() {
|
||||||
CDPATH='' cd -- "$@" &>/dev/null || return
|
CDPATH='' cd -- "$@" &>/dev/null || return
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user