lib/command_runner.rb in webroar-0.3.0 vs lib/command_runner.rb in webroar-0.3.1
- old
+ new
@@ -204,11 +204,11 @@
@options[:library_paths] = ""
end
def run
- parse_args
+ return unless parse_args
if ARGV.length == 0
puts HELP
return
end
@@ -256,11 +256,11 @@
opts.on( '-i', '--import', 'Import configuration, logs and admin panel data from the previous installation') { @options[:import] = true }
opts.on( '--no-import', 'Do not import configuration, logs and admin panel data from the previous installation') { @options[:import] = false }
opts.on( '-v', '--version', 'Version information') do
Installer.new.version
- return
+ return false
end
opts.on( '-u', '--username USERNAME', 'Username for the administrator account of server\'s admin panel') do |value|
@options[:username] = value.lstrip.gsub(/^=/,"")
end
@@ -317,11 +317,13 @@
begin
optparse.parse!
rescue OptionParser::ParseError => err
puts "#{err}. See 'webroar --help'."
- return
+ return false
end
+
+ return true
end
end # class Command