Class: Pod::Command::Kwai::Install

Inherits:
Pod::Command::Kwai show all
Includes:
Kwai::Install::Lock
Defined in:
lib/cocoapods-kwai/command/install.rb

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(argv) ⇒ Install

Returns a new instance of Install.



16
17
18
19
# File 'lib/cocoapods-kwai/command/install.rb', line 16

def initialize(argv)
  @project_directory = argv.option('project-directory', '.')
  super
end

Class Method Details

.optionsObject



10
11
12
13
14
# File 'lib/cocoapods-kwai/command/install.rb', line 10

def self.options
  [
    ['--project-directory=/project/dir/', 'The path to the root of the project directory'],
  ].concat(super)
end

Instance Method Details

#runObject



21
22
23
24
25
26
# File 'lib/cocoapods-kwai/command/install.rb', line 21

def run
  synchronized do
    system "pod install --project-directory=#{@project_directory}"
    raise "执行 pod install 失败, pwd: #{`pwd`}" unless $?.success?
  end
end