forked from github/cordova-android
CB-10964 Handle build.json file starting with a BOM. This closes #286
This commit is contained in:
parent
0deaba0920
commit
d28ca67edb
3
bin/templates/cordova/lib/build.js
vendored
3
bin/templates/cordova/lib/build.js
vendored
@ -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) {
|
||||
|
Loading…
Reference in New Issue
Block a user