Skip to content

Commit 2986432

Browse files
committed
fix compile failed log printing
1 parent c1a2d53 commit 2986432

File tree

1 file changed

+11
-7
lines changed

1 file changed

+11
-7
lines changed

lib/cocoapods-binary/rome/build_framework.rb

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -116,14 +116,18 @@ def xcodebuild(sandbox, target, sdk='macosx', deployment_target=nil, other_optio
116116

117117
if !is_succeed
118118
begin
119-
# 64 represent command invalid. http://www.manpagez.com/man/3/sysexits/
120-
raise "shouldn't be handle by xcpretty" if exit_code == 64
121-
printer = XCPretty::Printer.new({:formatter => XCPretty::Simple, :colorize => 'auto'})
122-
log.each_line do |line|
123-
printer.pretty_print(line)
124-
end
119+
if log.include?('** BUILD FAILED **')
120+
# use xcpretty to print build log
121+
# 64 represent command invalid. http://www.manpagez.com/man/3/sysexits/
122+
printer = XCPretty::Printer.new({:formatter => XCPretty::Simple, :colorize => 'auto'})
123+
log.each_line do |line|
124+
printer.pretty_print(line)
125+
end
126+
else
127+
raise "shouldn't be handle by xcpretty"
128+
end
125129
rescue
126-
puts log
130+
puts log.red
127131
end
128132
end
129133
[is_succeed, log]

0 commit comments

Comments
 (0)