cordova-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From omef...@apache.org
Subject android commit: CB-10964 Handle build.json file starting with a BOM. This closes #286
Date Fri, 08 Apr 2016 22:32:23 GMT
Repository: cordova-android
Updated Branches:
  refs/heads/master 0deaba092 -> d28ca67ed


CB-10964 Handle build.json file starting with a BOM. This closes #286


Project: http://git-wip-us.apache.org/repos/asf/cordova-android/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-android/commit/d28ca67e
Tree: http://git-wip-us.apache.org/repos/asf/cordova-android/tree/d28ca67e
Diff: http://git-wip-us.apache.org/repos/asf/cordova-android/diff/d28ca67e

Branch: refs/heads/master
Commit: d28ca67edb86aa86b1aafdbdbaf685e838737026
Parents: 0deaba0
Author: daserge <v-seshak@microsoft.com>
Authored: Wed Apr 6 16:36:43 2016 +0300
Committer: Omar Mefire <omefire@gmail.com>
Committed: Fri Apr 8 15:32:04 2016 -0700

----------------------------------------------------------------------
 bin/templates/cordova/lib/build.js | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-android/blob/d28ca67e/bin/templates/cordova/lib/build.js
----------------------------------------------------------------------
diff --git a/bin/templates/cordova/lib/build.js b/bin/templates/cordova/lib/build.js
index e2b3755..004656c 100644
--- a/bin/templates/cordova/lib/build.js
+++ b/bin/templates/cordova/lib/build.js
@@ -90,8 +90,7 @@ function parseOpts(options, resolvedTarget, projectRoot) {
         }
         events.emit('log', 'Reading build config file: '+ path.resolve(buildConfig));
         var buildjson = fs.readFileSync(buildConfig, 'utf8');
-        //var config = JSON.parse(fs.readFileSync(buildConfig, 'utf8'));
-        var config = JSON.parse(buildjson);
+        var config = JSON.parse(buildjson.replace(/^\ufeff/, '')); // Remove BOM
         if (config.android && config.android[ret.buildType]) {
             var androidInfo = config.android[ret.buildType];
             if(androidInfo.keystore && !packageArgs.keystore) {


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cordova.apache.org
For additional commands, e-mail: commits-help@cordova.apache.org


Mime
View raw message