Skip to content

Commit 99be00f

Browse files
committed
fix: don't add duplicate HEADER_SEARCH_PATHS
1 parent 8f7639f commit 99be00f

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

lib/pbxProject.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1566,7 +1566,11 @@ pbxProject.prototype.addToHeaderSearchPaths = function(file, productName) {
15661566
buildSettings['HEADER_SEARCH_PATHS'] = [INHERITED];
15671567
}
15681568

1569-
buildSettings['HEADER_SEARCH_PATHS'].push(searchPathForFile(file, this));
1569+
// Check if the search path is already in the HEADER_SEARCH_PATHS and add it if it's not.
1570+
const searchPath = searchPathForFile(file, this);
1571+
if (buildSettings['HEADER_SEARCH_PATHS'].indexOf(searchPath) < 0) {
1572+
buildSettings['HEADER_SEARCH_PATHS'].push(searchPath);
1573+
}
15701574
}
15711575
}
15721576

0 commit comments

Comments
 (0)