diff --git a/Library/Homebrew/cask/lib/hbc/cli/options.rb b/Library/Homebrew/cask/lib/hbc/cli/options.rb index 84126caa56c87a6707f0b018b0e49849c364d45b..75dd77212014d478c444c36d717611d2659cd6b4 100644 --- a/Library/Homebrew/cask/lib/hbc/cli/options.rb +++ b/Library/Homebrew/cask/lib/hbc/cli/options.rb @@ -24,10 +24,12 @@ module Hbc if [true, false].include?(default_value) define_method(:"#{method}?") do + return default_value unless instance_variable_defined?(:"@#{method}") instance_variable_get(:"@#{method}") == true end else define_method(:"#{method}") do + return default_value unless instance_variable_defined?(:"@#{method}") instance_variable_get(:"@#{method}") end end