Method: Pod::Command#initialize

Defined in:
lib/cocoapods/command.rb

#initialize(argv) ⇒ Command

TODO:

If a command is run inside another one some settings which where true might return false.

TODO:

We should probably not even load colored unless needed.

TODO:

Move silent flag to CLAide.

Note:

It is important that the commands don't override the default settings if their flag is missing (i.e. their value is nil)

Returns a new instance of Command.



85
86
87
88
89
90
91
92
93
94
# File 'lib/cocoapods/command.rb', line 85

def initialize(argv)
  super
  config.silent = argv.flag?('silent', config.silent)
  config.allow_root = argv.flag?('allow-root', config.allow_root)
  config.verbose = self.verbose? unless verbose.nil?
  unless self.ansi_output?
    Colored2.disable!
    String.send(:define_method, :colorize) { |string, _| string }
  end
end