From e6256d0178ea4787dbd1a3791bac2461e844e29f Mon Sep 17 00:00:00 2001 From: Thomas Reynolds Date: Tue, 5 Jun 2012 11:48:34 -0700 Subject: [PATCH] --help should work in CLI --- middleman-core/bin/middleman | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/middleman-core/bin/middleman b/middleman-core/bin/middleman index 5d1d6af5..b536f2bb 100755 --- a/middleman-core/bin/middleman +++ b/middleman-core/bin/middleman @@ -42,8 +42,13 @@ require "middleman-core/extensions" require "middleman-core/cli" +# Change flag to a module +ARGV.unshift("help") if ARGV.delete("--help") + # Default command is server -ARGV.unshift("server") if ARGV.length < 1 || ARGV.first.include?("-") +if ARGV[0] != "help" && (ARGV.length < 1 || ARGV.first.include?("-")) + ARGV.unshift("server") +end # Start the CLI if ENV["MM_ROOT"]