Exit with error code on init command failed

This commit is contained in:
Ryunosuke SATO 2015-12-23 23:29:16 +09:00
parent 3b596d5e3e
commit e56227c945

View file

@ -39,7 +39,7 @@ module Middleman::Cli
rescue ::OpenURI::HTTPError rescue ::OpenURI::HTTPError
say "Template `#{options[:template]}` not found in Middleman Directory." say "Template `#{options[:template]}` not found in Middleman Directory."
say 'Did you mean to use a full `user/repo` path?' say 'Did you mean to use a full `user/repo` path?'
exit exit 1
end end
else else
repo_name, repo_branch = options[:template].split('#') repo_name, repo_branch = options[:template].split('#')
@ -55,7 +55,7 @@ module Middleman::Cli
unless File.directory?(dir) unless File.directory?(dir)
say 'Git clone failed, maybe the url is invalid or you don\'t have the permissions?', :red say 'Git clone failed, maybe the url is invalid or you don\'t have the permissions?', :red
exit exit 1
end end
inside(target) do inside(target) do