Skip to content

Commit c1e7b6e

Browse files
authored
Merge pull request swiftlang#869 from ahoppen/tests-on-602
Fix tests when building swift-format using Swift 6.0.2
2 parents 3ca1a18 + 211884f commit c1e7b6e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Sources/SwiftFormat/API/Configuration.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -478,7 +478,7 @@ fileprivate extension URL {
478478
#if os(Windows)
479479
// FIXME: We should call into Windows' native check to check if this path is a root once https://github.com/swiftlang/swift-foundation/issues/976 is fixed.
480480
// https://github.com/swiftlang/swift-format/issues/844
481-
return self.pathComponents.count == 1
481+
return self.pathComponents.count <= 1
482482
#else
483483
// On Linux, we may end up with an string for the path due to https://github.com/swiftlang/swift-foundation/issues/980
484484
// TODO: Remove the check for "" once https://github.com/swiftlang/swift-foundation/issues/980 is fixed.

0 commit comments

Comments
 (0)