We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 19af7a5 commit bd3fefdCopy full SHA for bd3fefd
Sources/PackageLoading/IdentityResolver.swift
@@ -27,7 +27,16 @@ public struct DefaultIdentityResolver: IdentityResolver {
27
28
public func resolveIdentity(for location: String) -> PackageIdentity {
29
let location = self.resolveLocation(from: location)
30
- return PackageIdentity(url: location)
+
31
+ let components = location.split(separator: "/")
32
+ guard components.count == 2,
33
+ let scope = components.first,
34
+ let name = components.last
35
+ else {
36
+ return PackageIdentity(url: location)
37
+ }
38
39
+ return PackageIdentity.plain("\(scope).\(name)")
40
}
41
42
public func resolveIdentity(for path: AbsolutePath) -> PackageIdentity {
0 commit comments