Print out the new style help with -h and --help instead of the old-style help.

This commit is contained in:
Chris Eppstein 2010-08-31 21:48:25 -07:00
parent de66f7ad6a
commit 01cbc9cc6c
2 changed files with 9 additions and 2 deletions

View File

@ -5,8 +5,10 @@ module Compass::Exec
if Compass::Commands.command_exists? arguments.first
SubCommandUI
else
Compass::Logger.new.red do
Haml::Util.haml_warn "WARNING: This interface is deprecated. Please use the new subcommand interface.\nSee `compass help` for more information.\n"
unless arguments.include?("-h") || arguments.include?("--help")
Compass::Logger.new.red do
Haml::Util.haml_warn "WARNING: This interface is deprecated. Please use the new subcommand interface.\nSee `compass help` for more information.\n"
end
end
SwitchUI
end

View File

@ -89,6 +89,11 @@ END
self.options[:pattern] = pattern
end
opts.on('-h', '--help') do
self.options[:command] = :help
self.options[:help_command] = :help
end
opts.on('--write-configuration', "Write the current configuration to the configuration file.") do
self.options[:command] = :write_configuration
end