mirror of
https://github.com/middleman/middleman.git
synced 2022-11-09 12:20:27 -05:00
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]
|
||||||
|
@ -120,4 +120,4 @@ module Middleman
|
||||||
exit 0
|
exit 0
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in a new issue