Update Library/Homebrew/sbom.rb

Co-authored-by: Ruoyu Zhong <zhongruoyu@outlook.com>
This commit is contained in:
Sean Molenaar 2024-05-26 13:20:04 +02:00 committed by GitHub
parent 9d75d09a82
commit fdb347c35f
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -156,8 +156,7 @@ class SBOM
# will no longer be valid.
Formula.clear_cache unless spdxfile.exist?
valid = valid?(bottling:)
if validate && valid.present? && !valid
if validate && (valid = valid?(bottling:)).present? && !valid
opoo "SBOM is not valid, not writing to disk!"
return
end