aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Homebrew/cask/lib
diff options
context:
space:
mode:
authorJoshua Hagins2016-08-30 21:51:40 -0400
committerJoshua Hagins2016-08-30 21:51:40 -0400
commit5b593ebb8958cc57cfbbd7013ca3d275466d66bf (patch)
tree50ad7a31f8923293457224fe7250209a2a3dcf70 /Library/Homebrew/cask/lib
parent1b6908f41e874040d29e7c698b7dd83b037bc61d (diff)
downloadbrew-5b593ebb8958cc57cfbbd7013ca3d275466d66bf.tar.bz2
Allow deprecated hash syntax in Cask headers
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