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
class << self
def exit_on_failure?
true
end
# Middleman::Base singleton
#
# @return [Middleman::Base]

View file

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

View file

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