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

Failing with useful message on mac build step #325

Merged
merged 2 commits into from
Sep 6, 2013
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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);
done(false);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should return here or move the done() into an else.

}
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