Changeset 1147

Show
Ignore:
Timestamp:
01/02/08 09:32:48 (11 months ago)
Author:
jimfree..@gmail.com
Message:

Added back -h option for help and fixed merb to print help message when run with no args and outside a merb dir

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/lib/merb/server.rb

    r1143 r1147  
    176176            exit 
    177177          end 
     178        end 
     179 
     180        # If we run merb with no arguments and we are not inside a merb root 
     181        # show the help message 
     182        if !defined?(__DIR__) && (argv.size == 0) && !File.exists?("#{options[:merb_root] || Merb::Config.defaults[:merb_root]}/config/merb_init.rb")  
     183          puts "You are not in the root of a merb application...\n" 
     184          puts opts  
     185          exit  
     186        end 
     187 
     188        # Special case of looking for help 
     189        if ARGV == ["-h"] 
     190          puts opts   
     191          exit 
    178192        end 
    179193