Merge pull request #201 from bhollis/master
Validate the template option for "middleman init"
This commit is contained in:
commit
85e1918dd6
1 changed files with 2 additions and 2 deletions
|
@ -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…
Add table
Reference in a new issue