Validate the template option for "middleman init"
This commit is contained in:
parent
0b90a6a800
commit
e1b338041b
|
@ -41,7 +41,7 @@ module Middleman
|
||||||
def init(name)
|
def init(name)
|
||||||
key = options[:template].to_sym
|
key = options[:template].to_sym
|
||||||
unless Middleman::Templates.registered.has_key?(key)
|
unless Middleman::Templates.registered.has_key?(key)
|
||||||
key = :default
|
raise Thor::Error.new "Unknown project template '#{key}'"
|
||||||
end
|
end
|
||||||
|
|
||||||
thor_group = Middleman::Templates.registered[key]
|
thor_group = Middleman::Templates.registered[key]
|
||||||
|
|
Loading…
Reference in a new issue