Skip to content

Commit 1fab572

Browse files
committed
[Workspace] Don't validate the pins when there are errors
<rdar://problem/47011812> SwiftPM removes the resolved file when the manifest has parsing errors
1 parent 0e6a400 commit 1fab572

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

Sources/Workspace/Workspace.swift

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1166,6 +1166,10 @@ extension Workspace {
11661166
// Load the current manifests.
11671167
let graphRoot = PackageGraphRoot(input: root, manifests: rootManifests)
11681168
let currentManifests = loadDependencyManifests(root: graphRoot, diagnostics: diagnostics)
1169+
guard !diagnostics.hasErrors else {
1170+
return currentManifests
1171+
}
1172+
11691173
validatePinsStore(dependencyManifests: currentManifests, diagnostics: diagnostics)
11701174

11711175
// Abort if pinsStore is unloadable or if diagnostics has errors.

0 commit comments

Comments
 (0)