Make build error message code a bit more compact

This commit is contained in:
Ben Hollis 2013-01-25 20:22:45 -08:00
parent 8f0cc92f1b
commit 7c9c4d03db

View file

@ -65,11 +65,9 @@ module Middleman::Cli
action GlobAction.new(self, opts) action GlobAction.new(self, opts)
if @had_errors && !@debugging if @had_errors && !@debugging
if defined?(Bundler) cmd = "middleman build --verbose"
self.shell.say "There were errors during this build, re-run with `bundle exec 'middleman build --verbose'` to see the full exception." cmd = "bundle exec '#{cmd}'" if defined?(Bundler)
else self.shell.say "There were errors during this build, re-run with `#{cmd}` to see the full exception."
self.shell.say "There were errors during this build, re-run with `middleman build --verbose` to see the full exception."
end
end end
exit(1) if @had_errors exit(1) if @had_errors