Skip to content

Commit c785a4f

Browse files
committed
fix: fix PR comments
1 parent 185a9ab commit c785a4f

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

lib/constants.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ function unquoted(text) {
112112
return text == null ? '' : text.replace (/(^")|("$)/g, '')
113113
}
114114

115-
function quote(name) {
115+
function quoteIfNeeded(name) {
116116
const quotedName = (name.indexOf(" ") >= 0 || name.indexOf("@") >= 0) && name[0] !== `"` ? `"${name}"` : name;
117117
return quotedName;
118118
}
@@ -143,5 +143,5 @@ module.exports = {
143143
isPlistFileType,
144144
isModuleMapFileType,
145145
unquoted,
146-
quote
146+
quoteIfNeeded
147147
}

lib/pbxProject.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -550,7 +550,7 @@ pbxProject.prototype.addPbxGroup = function (filePathsArray, name, path, sourceT
550550
var groups = this.hash.project.objects['PBXGroup'],
551551
pbxGroupUuid = opt.uuid || this.generateUuid(),
552552
commentKey = f("%s_comment", pbxGroupUuid),
553-
groupName = constants.quote(name),
553+
groupName = constants.quoteIfNeeded(name),
554554
pbxGroup = {
555555
isa: 'PBXGroup',
556556
children: [],
@@ -611,7 +611,7 @@ pbxProject.prototype.addPbxGroup = function (filePathsArray, name, path, sourceT
611611
}
612612

613613
if(isEntitlementFileType(file.lastKnownFileType)) {
614-
this.addToBuildSettings('CODE_SIGN_ENTITLEMENTS', constants.quote(file.path), opt.target);
614+
this.addToBuildSettings('CODE_SIGN_ENTITLEMENTS', constants.quoteIfNeeded(file.path), opt.target);
615615
continue;
616616
}
617617

0 commit comments

Comments
 (0)