From 5b8bc14afd3d63b0a853aee10be2aa6c53375357 Mon Sep 17 00:00:00 2001 From: Mike McQuaid Date: Tue, 30 Aug 2022 12:53:42 +0000 Subject: [PATCH] shims/gems/rubocop: handle when `brew` isn't in PATH. Instead, figure out where `$HOMEBREW_PREFIX/bin` should be and use that. --- Library/Homebrew/shims/gems/rubocop | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Library/Homebrew/shims/gems/rubocop b/Library/Homebrew/shims/gems/rubocop index 4cfafc2e07..e1e251669e 100755 --- a/Library/Homebrew/shims/gems/rubocop +++ b/Library/Homebrew/shims/gems/rubocop @@ -1,2 +1,3 @@ #!/bin/bash -exec brew rubocop "$@" +HOMEBREW_PREFIX_BIN="$(cd "$(dirname "$0")"/../../../../ && pwd)/bin/" +exec "${HOMEBREW_PREFIX_BIN}"brew rubocop "$@"