aboutsummaryrefslogtreecommitdiffstats
path: root/Library
diff options
context:
space:
mode:
Diffstat (limited to 'Library')
-rw-r--r--Library/Homebrew/cask/lib/hbc/audit.rb10
1 files changed, 4 insertions, 6 deletions
diff --git a/Library/Homebrew/cask/lib/hbc/audit.rb b/Library/Homebrew/cask/lib/hbc/audit.rb
index 51316baec..d757b0623 100644
--- a/Library/Homebrew/cask/lib/hbc/audit.rb
+++ b/Library/Homebrew/cask/lib/hbc/audit.rb
@@ -57,9 +57,8 @@ module Hbc
add_warning "only a single preflight stanza is allowed"
end
- if cask.artifacts.count { |k| k.is_a?(Hbc::Artifact::PostflightBlock) && k.directives.key?(:postflight) } > 1
- add_warning "only a single postflight stanza is allowed"
- end
+ return unless cask.artifacts.count { |k| k.is_a?(Hbc::Artifact::PostflightBlock) && k.directives.key?(:postflight) } > 1
+ add_warning "only a single postflight stanza is allowed"
end
def check_single_uninstall_zap
@@ -77,9 +76,8 @@ module Hbc
add_warning "only a single uninstall_postflight stanza is allowed"
end
- if cask.artifacts.count { |k| k.is_a?(Hbc::Artifact::Zap) } > 1
- add_warning "only a single zap stanza is allowed"
- end
+ return unless cask.artifacts.count { |k| k.is_a?(Hbc::Artifact::Zap) } > 1
+ add_warning "only a single zap stanza is allowed"
end
def check_required_stanzas