From e56227c945ba430e0fe91094ae36b59dac9a6682 Mon Sep 17 00:00:00 2001 From: Ryunosuke SATO Date: Wed, 23 Dec 2015 23:29:16 +0900 Subject: [PATCH] Exit with error code on `init` command failed --- middleman-cli/lib/middleman-cli/init.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/middleman-cli/lib/middleman-cli/init.rb b/middleman-cli/lib/middleman-cli/init.rb index 5bdfb6e3..469d9d4c 100644 --- a/middleman-cli/lib/middleman-cli/init.rb +++ b/middleman-cli/lib/middleman-cli/init.rb @@ -39,7 +39,7 @@ module Middleman::Cli rescue ::OpenURI::HTTPError say "Template `#{options[:template]}` not found in Middleman Directory." say 'Did you mean to use a full `user/repo` path?' - exit + exit 1 end else repo_name, repo_branch = options[:template].split('#') @@ -55,7 +55,7 @@ module Middleman::Cli unless File.directory?(dir) say 'Git clone failed, maybe the url is invalid or you don\'t have the permissions?', :red - exit + exit 1 end inside(target) do