aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Homebrew/cask/lib
diff options
context:
space:
mode:
Diffstat (limited to 'Library/Homebrew/cask/lib')
-rw-r--r--Library/Homebrew/cask/lib/hbc/source/path_base.rb4
1 files changed, 4 insertions, 0 deletions
diff --git a/Library/Homebrew/cask/lib/hbc/source/path_base.rb b/Library/Homebrew/cask/lib/hbc/source/path_base.rb
index bbb413fd3..bd85ab425 100644
--- a/Library/Homebrew/cask/lib/hbc/source/path_base.rb
+++ b/Library/Homebrew/cask/lib/hbc/source/path_base.rb
@@ -55,6 +55,10 @@ class Hbc::Source::PathBase
end
def build_cask(cask_class, header_token, &block)
+ if header_token.is_a?(Hash)
+ # Cask file is using old `cask :v1 => 'token'` syntax
+ header_token = header_token.values.first
+ end
raise Hbc::CaskTokenDoesNotMatchError.new(cask_token, header_token) unless cask_token == header_token
cask_class.new(cask_token, sourcefile_path: path, &block)
end