Merge pull request #17694 from SMillerDev/feat/general/invalidate_sudo

This commit is contained in:
William Woodruff 2024-07-13 16:35:00 -04:00 committed by GitHub
commit 46c156660b
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -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
}