Class: Pod::Cmmd

Inherits:
Object
  • Object
show all
Defined in:
lib/cocoapods-framework/util/cmd.rb

Class Method Summary collapse

Class Method Details

.sh!(command) ⇒ Object



4
5
6
7
8
9
10
11
12
# File 'lib/cocoapods-framework/util/cmd.rb', line 4

def sh! command
  UI.puts command
  output = `#{command}`.lines.to_a
  if $?.exitstatus != 0
    Pod::ErrorUtil.error_report command,output
    Process.exit -1
  end
  output
end

.sh?(command) ⇒ Boolean

Returns:

  • (Boolean)


14
15
16
17
18
19
20
21
# File 'lib/cocoapods-framework/util/cmd.rb', line 14

def sh? command
  UI.puts command
  output = `#{command}`.lines.to_a
  if $?.exitstatus != 0
    Pod::ErrorUtil.error_report command,output
  end
  output
end