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:35:30 UTC

cordova-windows git commit: CB-10964 Handle build.json file starting with a BOM. This closes #166

Repository: cordova-windows
Updated Branches:
  refs/heads/master 07f6158bc -> c996a31bd


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


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

Branch: refs/heads/master
Commit: c996a31bdc72f5fc35b8eb770958edaab2a630cd
Parents: 07f6158
Author: daserge <v-...@microsoft.com>
Authored: Fri Apr 8 17:15:08 2016 +0300
Committer: Omar Mefire <om...@gmail.com>
Committed: Fri Apr 8 15:34:30 2016 -0700

----------------------------------------------------------------------
 template/cordova/lib/build.js | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-windows/blob/c996a31b/template/cordova/lib/build.js
----------------------------------------------------------------------
diff --git a/template/cordova/lib/build.js b/template/cordova/lib/build.js
index b890aa5..1ce9e90 100644
--- a/template/cordova/lib/build.js
+++ b/template/cordova/lib/build.js
@@ -222,7 +222,7 @@ function parseBuildConfig(buildConfigPath, buildType) {
     events.emit('verbose', 'Reading build config file: '+ buildConfigPath);
     try {
         var contents = fs.readFileSync(buildConfigPath, 'utf8');
-        buildConfig = JSON.parse(contents);
+        buildConfig = JSON.parse(contents.replace(/^\ufeff/, '')); // Remove BOM
     } catch (e) {
         if (e.code === 'ENOENT') {
             throw new CordovaError('Specified build config file does not exist: ' + buildConfigPath);


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