Skip to content

Commit

Permalink
Update lint violations
Browse files Browse the repository at this point in the history
  • Loading branch information
mikenachbaur-okta committed Aug 15, 2024
1 parent 1619320 commit 04a17df
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,11 @@
import Foundation

extension URL {
@inlinable
// Workaround to address a known bug with URL.appendingPathComponent on Linux.
// https://github.com/apple/swift-corelibs-foundation/issues/4849
@inlinable
func appendingComponent(_ component: String) -> URL {
// swiftlint:disable force_unwrapping
#if os(Linux)
var components = URLComponents(url: self, resolvingAgainstBaseURL: true)!
if !components.path.hasSuffix("/") {
Expand All @@ -29,5 +30,6 @@ extension URL {
result.appendPathComponent(component)
return result
#endif
// swiftlint:enable force_unwrapping
}
}

0 comments on commit 04a17df

Please sign in to comment.