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

Commit 9dbf082

Browse files
committed
Merge pull request #325 from jsoverson/fail-build-steps
Failing with useful message on mac build step
2 parents e9f40e2 + 672a43a commit 9dbf082

File tree

2 files changed

+8
-1
lines changed

2 files changed

+8
-1
lines changed

tasks/build.js

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,12 @@ module.exports = function (grunt) {
6060
spawn([
6161
"xcodebuild -project appshell.xcodeproj -config Release clean",
6262
"xcodebuild -project appshell.xcodeproj -config Release build"
63-
]).then(function () {
63+
]).then(function (result) {
64+
if (result.stderr.match('xcrun: Error')) {
65+
grunt.log.error('Unable to run : ' + result.cmd + ' ' + result.args.join(' '));
66+
grunt.log.error(result.stderr);
67+
return done(false);
68+
}
6469
done();
6570
}, function (err) {
6671
grunt.log.error(err);

tasks/common.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -185,6 +185,8 @@ module.exports = function (grunt) {
185185
}
186186
child.on("close", function (code) {
187187
var closeResult = {
188+
cmd: cmd,
189+
args: args,
188190
code: code,
189191
stdout: stdout.toString(),
190192
stderr: stderr.toString(),

0 commit comments

Comments
 (0)