From 04381b26dd0afea389fec54640bae973536db494 Mon Sep 17 00:00:00 2001 From: Michael Cho Date: Fri, 23 Aug 2024 22:56:15 -0400 Subject: [PATCH] keg_relocate: allow spaces/tabs after shebang --- Library/Homebrew/keg_relocate.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Library/Homebrew/keg_relocate.rb b/Library/Homebrew/keg_relocate.rb index 46170cd448..d023d10209 100644 --- a/Library/Homebrew/keg_relocate.rb +++ b/Library/Homebrew/keg_relocate.rb @@ -96,7 +96,7 @@ class Keg end relocation.add_replacement_pair(:library, HOMEBREW_LIBRARY.to_s, LIBRARY_PLACEHOLDER, path: true) relocation.add_replacement_pair(:perl, - %r{\A#!(?:/usr/bin/perl\d\.\d+|#{HOMEBREW_PREFIX}/opt/perl/bin/perl)( |$)}o, + %r{\A#![ \t]*(?:/usr/bin/perl\d\.\d+|#{HOMEBREW_PREFIX}/opt/perl/bin/perl)( |$)}o, "#!#{PERL_PLACEHOLDER}\\1") relocation.add_replacement_pair(:java, JAVA_REGEX, JAVA_PLACEHOLDER)