From 1124ab315c8d7ca3d03ca4f91a91a945ffd7ee53 Mon Sep 17 00:00:00 2001 From: Mike McQuaid Date: Tue, 25 Jun 2024 08:53:46 +0100 Subject: [PATCH] cmd/vendor-install: add extra read check. Co-authored-by: Carlo Cabrera <30379873+carlocab@users.noreply.github.com> --- Library/Homebrew/cmd/vendor-install.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Library/Homebrew/cmd/vendor-install.sh b/Library/Homebrew/cmd/vendor-install.sh index 21feac9437..ab6b4afffc 100644 --- a/Library/Homebrew/cmd/vendor-install.sh +++ b/Library/Homebrew/cmd/vendor-install.sh @@ -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