Deleted the duplicated "PWD check"

This commit is contained in:
xycabcd 2024-08-29 14:45:27 -04:00 committed by GitHub
parent 638a3dc3a3
commit 147cfa46e4
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -369,17 +369,6 @@ then
odie "Cowardly refusing to continue at this prefix: ${HOMEBREW_PREFIX}"
fi
# Many Pathname operations use getwd when they shouldn't, and then throw
# odd exceptions. Reduce our support burden by showing a user-friendly error.
if ! [[ -d "${PWD}" ]]
then
odie "The current working directory must exist to run brew."
fi
if ! [[ -r "${PWD}" ]]
then
odie "The current working directory must be readable to ${USER} to run brew."
fi
#####
##### Now, do everything else (that may be a bit slower).
#####