cmd/vendor-install: add extra read check.

Co-authored-by: Carlo Cabrera <30379873+carlocab@users.noreply.github.com>
This commit is contained in:
Mike McQuaid 2024-06-25 08:53:46 +01:00 committed by GitHub
parent c214952e2b
commit 1124ab315c
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -33,7 +33,7 @@ set_ruby_variables() {
fi
ruby_PLATFORMINFO="${HOMEBREW_LIBRARY}/Homebrew/vendor/portable-ruby-${ruby_PROCESSOR}-${ruby_OS}"
if [[ -f "${ruby_PLATFORMINFO}" ]]
if [[ -f "${ruby_PLATFORMINFO}" && -r "${ruby_PLATFORMINFO}" ]]
then
# ruby_TAG and ruby_SHA will be set via the sourced file if it exists
# shellcheck disable=SC1090