lib/capistrano/cli/options.rb
# If the arguments to the command are empty, this will print the
# allowed options and exit. Otherwise, it will parse the command
# line and set up any default options.
If the arguments to the command are empty, this will print the
allowed options and exit. Otherwise, it will parse the command
line and set up any default options.
If the arguments to the command are empty this will print the allowed options and exit . Otherwise it will parse the command line and set up any default options .
def parse_options! 
        @options = { :recipes => [], :actions => [],
          :vars => {}, :pre_vars => {},
          :sysconf => default_sysconf, :dotfile => default_dotfile }
        if args.empty?
          warn "Please specify at least one action to execute."
          warn option_parser
          exit
        end
        option_parser.parse!(args)
        coerce_variable_types!
        options[:verbose] = 3 if !options.has_key?(:verbose)
        look_for_default_recipe_file! if options[:default_config] || options[:recipes].empty?
        extract_environment_variables!
        options[:actions].concat(args)
        password = options.has_key?(:password)
        options[:password] = Proc.new { self.class.password_prompt }
        options[:password] = options[:password].call if password
      end
def parse_options! @options = { :recipes => [ ] , :actions => [ ] , :vars => { } , :pre_vars => { } , :sysconf => default_sysconf , :dotfile => default_dotfile } if args . empty? warn "Please specify at least one action to execute." warn option_parser exit end option_parser . parse! ( args ) coerce_variable_types! options [ :verbose ] = 3 if ! options . has_key? ( :verbose ) look_for_default_recipe_file! if options [ :default_config ] || options [ :recipes ] . empty? extract_environment_variables! options [ :actions ] . concat ( args ) password = options . has_key? ( :password ) options [ :password ] = Proc . new { self . class . password_prompt } options [ :password ] = options [ :password ] . call if password end
If the arguments to the command are empty, this will print the
allowed options and exit.
If the arguments to the command are empty this will print the allowed options and exit .
#:nodoc: # if no verbosity has been specified, be verbose