Skip to content

Commit e095584

Browse files
committed
Revert
1 parent a0c82f2 commit e095584

File tree

1 file changed

+1
-13
lines changed

1 file changed

+1
-13
lines changed

Sources/ProjectSpec/Project.swift

Lines changed: 1 addition & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -195,19 +195,7 @@ extension Project {
195195
attributes = jsonDictionary.json(atKeyPath: "attributes") ?? [:]
196196
include = jsonDictionary.json(atKeyPath: "include") ?? []
197197
if jsonDictionary["packages"] != nil {
198-
packages = try jsonDictionary.json(atKeyPath: "packages", invalidItemBehaviour: .custom({ error in
199-
guard error.reason == .incorrectType && type(of: error.expectedType.self) == String.Type.self else {
200-
return .fail
201-
}
202-
var pairs = [(String, Any)]()
203-
for item in error.dictionary {
204-
pairs.append((
205-
item.key as? String ?? "",
206-
(item.value as? LosslessStringConvertible).map { String($0) } ?? item.value
207-
))
208-
}
209-
return (try? .value(.init(jsonDictionary: .init(uniqueKeysWithValues: pairs)))) ?? .fail
210-
}))
198+
packages = try jsonDictionary.json(atKeyPath: "packages", invalidItemBehaviour: .fail)
211199
} else {
212200
packages = [:]
213201
}

0 commit comments

Comments
 (0)