Skip to content
This repository has been archived by the owner on Sep 2, 2021. It is now read-only.

Commit

Permalink
Merge pull request #325 from jsoverson/fail-build-steps
Browse files Browse the repository at this point in the history
Failing with useful message on mac build step
  • Loading branch information
jasonsanjose committed Sep 6, 2013
2 parents e9f40e2 + 672a43a commit 9dbf082
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
7 changes: 6 additions & 1 deletion tasks/build.js
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,12 @@ module.exports = function (grunt) {
spawn([
"xcodebuild -project appshell.xcodeproj -config Release clean",
"xcodebuild -project appshell.xcodeproj -config Release build"
]).then(function () {
]).then(function (result) {
if (result.stderr.match('xcrun: Error')) {
grunt.log.error('Unable to run : ' + result.cmd + ' ' + result.args.join(' '));
grunt.log.error(result.stderr);
return done(false);
}
done();
}, function (err) {
grunt.log.error(err);
Expand Down
2 changes: 2 additions & 0 deletions tasks/common.js
Original file line number Diff line number Diff line change
Expand Up @@ -185,6 +185,8 @@ module.exports = function (grunt) {
}
child.on("close", function (code) {
var closeResult = {
cmd: cmd,
args: args,
code: code,
stdout: stdout.toString(),
stderr: stderr.toString(),
Expand Down

0 comments on commit 9dbf082

Please sign in to comment.