Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

xcodebuild print errors only

Tags:

ant

xcodebuild

I saw this command in SO How to filter the xcodebuild command line output?

which shows only the errors and warnings when we do xcodebuild otherwise the xcodebuild commands prints everything to the console regarding what it is doing.

Is there a way I can use grep with xcodebuild in an ant task ?

 <exec executable="xcodebuild" failonerror="true">
                <arg value="| grep error" />
                <arg value="clean" />
                <arg value="build" />
  </exec> 

The exec task above throws error while trying to execute the ant task.

like image 519
Nav Avatar asked Mar 11 '26 02:03

Nav


1 Answers

-quiet do not print any output except for warnings and errors

xcodebuild clean build -quiet

it works.

like image 132
Languoguang Avatar answered Mar 13 '26 18:03

Languoguang