Skip to content

Commit

Permalink
fix compilation error in ci enviroment
Browse files Browse the repository at this point in the history
  • Loading branch information
takeshi-1000 committed Dec 6, 2022
1 parent a40341f commit ca25eca
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions Sources/XcodeGenKit/TargetSourceFilterable.swift
Original file line number Diff line number Diff line change
Expand Up @@ -48,12 +48,12 @@ extension TargetSourceFilterable {
&& !excludePaths.contains(path)
// If includes is empty, it's included. If it's not empty, the path either needs to match exactly, or it needs to be a direct parent of an included path.
&& (includePaths.value.isEmpty || _isIncludedPathSorted(path, sortedPaths: includePaths))
func _isIncludedPathSorted(_ path: Path, sortedPaths: SortedArray<Path>) -> Bool {
guard let idx = sortedPaths.firstIndex(where: { $0 >= path }) else { return false }
let foundPath = sortedPaths.value[idx]
return foundPath.description.hasPrefix(path.description)
}
}

private func _isIncludedPathSorted(_ path: Path, sortedPaths: SortedArray<Path>) -> Bool {
guard let idx = sortedPaths.firstIndex(where: { $0 >= path }) else { return false }
let foundPath = sortedPaths.value[idx]
return foundPath.description.hasPrefix(path.description)
}

func getSourceMatches(targetSource: TargetSource, patterns: [String]) -> Set<Path> {
Expand Down

0 comments on commit ca25eca

Please sign in to comment.