Skip to content

Commit bd3fefd

Browse files
committed
FIXME: temporary change to get registry resolution working
1 parent 19af7a5 commit bd3fefd

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

Sources/PackageLoading/IdentityResolver.swift

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,16 @@ public struct DefaultIdentityResolver: IdentityResolver {
2727

2828
public func resolveIdentity(for location: String) -> PackageIdentity {
2929
let location = self.resolveLocation(from: location)
30-
return PackageIdentity(url: location)
30+
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)")
3140
}
3241

3342
public func resolveIdentity(for path: AbsolutePath) -> PackageIdentity {

0 commit comments

Comments
 (0)