Skip to content

Commit

Permalink
[Android] improving merge of bluetooth permissions (white spaces)
Browse files Browse the repository at this point in the history
  • Loading branch information
becvert committed Jul 23, 2018
1 parent 96d7c1c commit a4bc71e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion merge-bluetooth-permission.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ module.exports = function(context) {
if (bluetoothPermissions.length > 1) {
var permissionWithoutMaxSDK = bluetoothPermissions.find(permission => permission.indexOf('android:maxSdkVersion') == -1);
if (permissionWithoutMaxSDK) {
var result = data.replace('<uses-permission android:maxSdkVersion="18" android:name="android.permission.BLUETOOTH" />', '');
var result = data.replace(/<uses-permission android:maxSdkVersion="18" android:name="android\.permission\.BLUETOOTH"\s?\/>/, '');
fs.writeFile(file, result, 'utf8', function (err) {
if (err) {
throw new Error('Unable to write into AndroidManifest.xml: ' + err);
Expand Down

0 comments on commit a4bc71e

Please sign in to comment.