mirror of
https://github.com/apache/cordova-android.git
synced 2025-02-26 12:03:28 +08:00
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));
|
events.emit('log', 'Reading build config file: '+ path.resolve(buildConfig));
|
||||||
var buildjson = fs.readFileSync(buildConfig, 'utf8');
|
var buildjson = fs.readFileSync(buildConfig, 'utf8');
|
||||||
//var config = JSON.parse(fs.readFileSync(buildConfig, 'utf8'));
|
var config = JSON.parse(buildjson.replace(/^\ufeff/, '')); // Remove BOM
|
||||||
var config = JSON.parse(buildjson);
|
|
||||||
if (config.android && config.android[ret.buildType]) {
|
if (config.android && config.android[ret.buildType]) {
|
||||||
var androidInfo = config.android[ret.buildType];
|
var androidInfo = config.android[ret.buildType];
|
||||||
if(androidInfo.keystore && !packageArgs.keystore) {
|
if(androidInfo.keystore && !packageArgs.keystore) {
|
||||||
|
Loading…
Reference in New Issue
Block a user