Skip to content

Commit

Permalink
Merge pull request #869 from ahoppen/tests-on-602
Browse files Browse the repository at this point in the history
Fix tests when building swift-format using Swift 6.0.2
  • Loading branch information
ahoppen authored Nov 4, 2024
2 parents 3ca1a18 + 211884f commit c1e7b6e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Sources/SwiftFormat/API/Configuration.swift
Original file line number Diff line number Diff line change
Expand Up @@ -478,7 +478,7 @@ fileprivate extension URL {
#if os(Windows)
// 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.
// https://github.com/swiftlang/swift-format/issues/844
return self.pathComponents.count == 1
return self.pathComponents.count <= 1
#else
// On Linux, we may end up with an string for the path due to https://github.com/swiftlang/swift-foundation/issues/980
// TODO: Remove the check for "" once https://github.com/swiftlang/swift-foundation/issues/980 is fixed.
Expand Down

0 comments on commit c1e7b6e

Please sign in to comment.