Skip to content
This repository was archived by the owner on Sep 9, 2020. It is now read-only.

Commit 2def431

Browse files
committed
dep: Don't try to look up known-removed projects
That'll give us a nil pointer panic. Fixes #1937.
1 parent 3e10ea7 commit 2def431

File tree

2 files changed

+3
-4
lines changed

2 files changed

+3
-4
lines changed

Gopkg.lock

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

txn_writer.go

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -697,11 +697,10 @@ func (dw *DeltaWriter) PrintPreparedActions(output *log.Logger, verbose bool) er
697697
i := 0
698698
for pr, reason := range dw.changed {
699699
lpd := dw.lockDiff.ProjectDeltas[pr]
700-
v, id := projs[pr].Version(), projs[pr].Ident()
701700
if reason == projectRemoved {
702-
output.Printf("(%d/%d) Would have removed %s", i, tot, id)
701+
output.Printf("(%d/%d) Would have removed %s", i, tot, pr)
703702
} else {
704-
output.Printf("(%d/%d) Would hae written %s@%s: %s", i, tot, id, v, changeExplanation(reason, lpd))
703+
output.Printf("(%d/%d) Would have written %s@%s: %s", i, tot, projs[pr].Ident(), projs[pr].Version(), changeExplanation(reason, lpd))
705704
}
706705
}
707706
}

0 commit comments

Comments
 (0)