Skip to content

Commit cb1fe9a

Browse files
authored
Merge pull request #20330 from Homebrew/empty_caveats
cmd/info: don't print empty caveats.
2 parents fe0a9c4 + 10eb549 commit cb1fe9a

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

Library/Homebrew/cmd/info.rb

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -360,7 +360,9 @@ def info_formula(formula)
360360
end
361361

362362
caveats = Caveats.new(formula)
363-
ohai "Caveats", caveats.to_s unless caveats.empty?
363+
if (caveats_string = caveats.to_s.presence)
364+
ohai "Caveats", caveats_string
365+
end
364366

365367
Utils::Analytics.formula_output(formula, args:)
366368
end

0 commit comments

Comments
 (0)