You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cordova.apache.org by om...@apache.org on 2016/04/09 00:30:44 UTC
ios commit: CB-10964 Handle build.json file starting with a BOM
Repository: cordova-ios
Updated Branches:
refs/heads/master 6cc86efbb -> 4abbcb6e7
CB-10964 Handle build.json file starting with a BOM
Project: http://git-wip-us.apache.org/repos/asf/cordova-ios/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-ios/commit/4abbcb6e
Tree: http://git-wip-us.apache.org/repos/asf/cordova-ios/tree/4abbcb6e
Diff: http://git-wip-us.apache.org/repos/asf/cordova-ios/diff/4abbcb6e
Branch: refs/heads/master
Commit: 4abbcb6e79c576911c76697c61041ff02c22eef1
Parents: 6cc86ef
Author: daserge <v-...@microsoft.com>
Authored: Fri Apr 8 17:15:32 2016 +0300
Committer: daserge <v-...@microsoft.com>
Committed: Fri Apr 8 17:15:32 2016 +0300
----------------------------------------------------------------------
bin/templates/scripts/cordova/lib/build.js | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cordova-ios/blob/4abbcb6e/bin/templates/scripts/cordova/lib/build.js
----------------------------------------------------------------------
diff --git a/bin/templates/scripts/cordova/lib/build.js b/bin/templates/scripts/cordova/lib/build.js
index 256a041..95b40bd 100644
--- a/bin/templates/scripts/cordova/lib/build.js
+++ b/bin/templates/scripts/cordova/lib/build.js
@@ -48,7 +48,8 @@ module.exports.run = function (buildOpts) {
return Q.reject('Build config file does not exist:' + buildOpts.buildConfig);
}
events.emit('log','Reading build config file:', path.resolve(buildOpts.buildConfig));
- var buildConfig = JSON.parse(fs.readFileSync(buildOpts.buildConfig, 'utf-8'));
+ var contents = fs.readFileSync(buildOpts.buildConfig, 'utf-8');
+ var buildConfig = JSON.parse(contents.replace(/^\ufeff/, '')); // Remove BOM
if(buildConfig.ios) {
var buildType = buildOpts.release ? 'release' : 'debug';
var config = buildConfig.ios[buildType];
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cordova.apache.org
For additional commands, e-mail: commits-help@cordova.apache.org