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

Failing with useful message on mac build step #325

merged 2 commits into from
Sep 6, 2013

Conversation

jsoverson
Copy link
Contributor

If xcodebuild didn't exist or wasn't executable, xcodebuild/xcrun would fail while still exiting with a 0 thereby allowing grunt to continue without noticing something was broken.

This does a quick check for general errors associated with xcrun and then fails the grunt task. The PR also includes the cmd and args that were run in the result output so the error messages can be more useful.

@ghost ghost assigned jasonsanjose Sep 6, 2013
@jasonsanjose
Copy link
Member

Woo @sandiegojs! Thanks @jsoverson. Can you sign the CLA http://dev.brackets.io/brackets-contributor-license-agreement.html before we merge?

@jsoverson
Copy link
Contributor Author

Signed it. Didn't notice a contributing.md so let me know if anything is out of place.

@njx
Copy link

njx commented Sep 6, 2013

Good point...we should add a CONTRIBUTING.md to this repo (even if it just references the one in the main Brackets repo). It could also include a mention of the fact that we want all issues in the main Brackets repo.

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.

@jasonsanjose
Copy link
Member

@jsoverson just one cleanup. Otherwise looks good.

@jsoverson
Copy link
Contributor Author

Added that, thanks for the catch.

@jasonsanjose
Copy link
Member

Merging.

jasonsanjose added a commit that referenced this pull request Sep 6, 2013
Failing with useful message on mac build step
@jasonsanjose jasonsanjose merged commit 5b8f557 into adobe:master Sep 6, 2013
@jsoverson jsoverson deleted the fail-build-steps branch September 6, 2013 23:25
jasonsanjose added a commit that referenced this pull request Dec 8, 2015
Failing with useful message on mac build step
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants