Tell Thor to return the right exit code on failure

This commit is contained in:
Ben Hollis 2012-03-18 17:30:25 -06:00
parent 85d2ace5ce
commit bacffeea02
3 changed files with 14 additions and 3 deletions

View file

@ -53,7 +53,10 @@ module Middleman::Cli
# Static methods # Static methods
class << self class << self
def exit_on_failure?
true
end
# Middleman::Base singleton # Middleman::Base singleton
# #
# @return [Middleman::Base] # @return [Middleman::Base]

View file

@ -42,6 +42,10 @@ module Middleman::Cli
thor_group.new([name], options).invoke_all thor_group.new([name], options).invoke_all
end end
end end
def self.exit_on_failure?
true
end
# Map "i", "new" and "n" to "init" # Map "i", "new" and "n" to "init"
Base.map({ Base.map({
@ -49,4 +53,4 @@ module Middleman::Cli
"new" => "init", "new" => "init",
"n" => "init" "n" => "init"
}) })
end end

View file

@ -51,7 +51,11 @@ module Middleman::Cli
Middleman::Watcher.start(params) Middleman::Watcher.start(params)
end end
end end
def self.exit_on_failure?
true
end
# Map "s" to "server" # Map "s" to "server"
Base.map({ "s" => "server" }) Base.map({ "s" => "server" })
end end