diff --git a/Sources/DangerDependenciesResolver/InlineDependenciesFinder.swift b/Sources/DangerDependenciesResolver/InlineDependenciesFinder.swift index c537bbfb..9c721fc9 100644 --- a/Sources/DangerDependenciesResolver/InlineDependenciesFinder.swift +++ b/Sources/DangerDependenciesResolver/InlineDependenciesFinder.swift @@ -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]) }