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

Commit

Permalink
dep: Don't try to look up known-removed projects
Browse files Browse the repository at this point in the history
That'll give us a nil pointer panic. Fixes #1937.
  • Loading branch information
sdboyer committed Jul 11, 2018
1 parent 3e10ea7 commit 2def431
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
2 changes: 1 addition & 1 deletion Gopkg.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 2 additions & 3 deletions txn_writer.go
Original file line number Diff line number Diff line change
Expand Up @@ -697,11 +697,10 @@ func (dw *DeltaWriter) PrintPreparedActions(output *log.Logger, verbose bool) er
i := 0
for pr, reason := range dw.changed {
lpd := dw.lockDiff.ProjectDeltas[pr]
v, id := projs[pr].Version(), projs[pr].Ident()
if reason == projectRemoved {
output.Printf("(%d/%d) Would have removed %s", i, tot, id)
output.Printf("(%d/%d) Would have removed %s", i, tot, pr)
} else {
output.Printf("(%d/%d) Would hae written %s@%s: %s", i, tot, id, v, changeExplanation(reason, lpd))
output.Printf("(%d/%d) Would have written %s@%s: %s", i, tot, projs[pr].Ident(), projs[pr].Version(), changeExplanation(reason, lpd))
}
}
}
Expand Down

0 comments on commit 2def431

Please sign in to comment.