Skip to content

Commit

Permalink
fix with new URL initializer
Browse files Browse the repository at this point in the history
  • Loading branch information
417-72KI committed Sep 1, 2024
1 parent d432a10 commit 3dcf5ff
Showing 1 changed file with 9 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,15 @@ struct InlineDependenciesFinder {
.trimmingCharacters(in: .whitespaces)
.components(separatedBy: " " + config.majorVersionPrefix)

guard let url = URL(string: splittedImportString[0]) else {
let url: URL? = {
#if os(macOS) && compiler(>=5.9)
if #available(macOS 14.0, *) {
return URL(string: splittedImportString[0], encodingInvalidCharacters: false)
}
#endif
return URL(string: splittedImportString[0])
}()
guard let url = url else {
throw Errors.invalidInlineDependencyURL(splittedImportString[0])
}

Expand Down

0 comments on commit 3dcf5ff

Please sign in to comment.