Skip to content

Commit b8663dc

Browse files
committed
fix with new URL initializer
1 parent f6c7cf6 commit b8663dc

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

Sources/DangerDependenciesResolver/InlineDependenciesFinder.swift

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,15 @@ struct InlineDependenciesFinder {
2929
.trimmingCharacters(in: .whitespaces)
3030
.components(separatedBy: " " + config.majorVersionPrefix)
3131

32-
guard let url = URL(string: splittedImportString[0]) else {
32+
let url: URL? = {
33+
#if os(macOS) && compiler(>=5.9)
34+
if #available(macOS 14.0, *) {
35+
return URL(string: splittedImportString[0], encodingInvalidCharacters: false)
36+
}
37+
#endif
38+
return URL(string: splittedImportString[0])
39+
}()
40+
guard let url = url else {
3341
throw Errors.invalidInlineDependencyURL(splittedImportString[0])
3442
}
3543

0 commit comments

Comments
 (0)