From e67abce950a08dd1429ddd43c32aae55a516c61a Mon Sep 17 00:00:00 2001 From: EricFromCanada Date: Sat, 22 Apr 2023 15:17:20 -0400 Subject: [PATCH] formula: consider arbitrary formula source paths --- Library/Homebrew/formula.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Library/Homebrew/formula.rb b/Library/Homebrew/formula.rb index 0e4feeb1c6..10517613aa 100644 --- a/Library/Homebrew/formula.rb +++ b/Library/Homebrew/formula.rb @@ -2199,7 +2199,7 @@ class Formula "sha256" => resource("ruby-source").checksum.hexdigest, } elsif !self.class.loaded_from_api && path.exist? - hsh["ruby_source_path"] = path.relative_path_from(tap.path).to_s + hsh["ruby_source_path"] = (path.relative_path_from(tap.path).to_s if tap) hsh["ruby_source_checksum"] = { "sha256" => Digest::SHA256.file(path).hexdigest, }