Skip to content

Commit b3d3ab3

Browse files
authored
Fix checks running in clones with nonstandard names (#5960)
1 parent ff8061d commit b3d3ab3

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

scripts/check_imports.swift

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,11 @@ private func main() -> Int32 {
145145
let logger = ErrorLogger()
146146
// Search the path upwards to find the root of the firebase-ios-sdk repo.
147147
var url = URL(fileURLWithPath: FileManager().currentDirectoryPath)
148-
while url.path != "/", url.lastPathComponent != "firebase-ios-sdk" {
148+
while url.path != "/" {
149+
let script = url.appendingPathComponent("scripts/check_imports.swift")
150+
if FileManager.default.fileExists(atPath: script.path) {
151+
break
152+
}
149153
url = url.deletingLastPathComponent()
150154
}
151155
let repoURL = url

0 commit comments

Comments
 (0)