Merge pull request #15291 from EricFromCanada/untapped-formula-path

formula: consider arbitrary formula source paths
This commit is contained in:
Markus Reiter 2023-04-23 02:01:24 +02:00 committed by GitHub
commit 4ddebd9bd5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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,
}