Skip to content

Commit

Permalink
Merge pull request #7126 from cb1kenobi/timob-19469
Browse files Browse the repository at this point in the history
[TIMOB-19469] Fixed bug when writing an entitlements file but the par…
  • Loading branch information
cheekiatng committed Sep 4, 2015
2 parents 16cb22f + 284def7 commit f9bad5e
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion iphone/cli/commands/_build.js
Original file line number Diff line number Diff line change
Expand Up @@ -3021,7 +3021,8 @@ iOSBuilder.prototype.createXcodeProject = function createXcodeProject(next) {
};

iOSBuilder.prototype._embedCapabilitiesAndWriteEntitlementsPlist = function _embedCapabilitiesAndWriteEntitlementsPlist(plist, dest) {
var caps = this.tiapp.ios.capabilities;
var caps = this.tiapp.ios.capabilities,
parent = path.dirname(dest);

// add any capabilities entitlements
Object.keys(caps).forEach(function (cap) {
Expand All @@ -3045,6 +3046,7 @@ iOSBuilder.prototype._embedCapabilitiesAndWriteEntitlementsPlist = function _emb
this.forceRebuild = true;
}
this.logger.debug(__('Writing %s', dest.cyan));
fs.existsSync(parent) || wrench.mkdirSyncRecursive(parent);
fs.writeFileSync(dest, contents);
} else {
this.logger.trace(__('No change, skipping %s', dest.cyan));
Expand Down

0 comments on commit f9bad5e

Please sign in to comment.