Skip to content
This repository has been archived by the owner on Feb 26, 2019. It is now read-only.

Commit

Permalink
In restore errors, mention which package had the problem.
Browse files Browse the repository at this point in the history
This improves the situation when the user runs `godep restore`
and sees a few instances of "restore, during download dep" errors.
Previously, it was not mentioned which packages failed to download.
Turning on -v verbose mode was not a good solution since it prints
too much other information for successfully processed packages.
  • Loading branch information
dmitshur authored and Edward Muller committed Dec 2, 2015
1 parent 0959752 commit cf33bd7
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 3 deletions.
4 changes: 4 additions & 0 deletions Changelog.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
# v31 2015/12/2

* In restore, mention which package had the problem -- @shurcool

# v30 2015/11/25

* Add `-t` flag to the `godep get` command.
Expand Down
4 changes: 2 additions & 2 deletions restore.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,15 +29,15 @@ func runRestore(cmd *Command, args []string) {
for _, dep := range g.Deps {
err := download(dep)
if err != nil {
log.Println("restore, during download dep:", err)
log.Printf("restore, during download dep %q: %v\n", dep.ImportPath, err)
hadError = true
}
}
if !hadError {
for _, dep := range g.Deps {
err := restore(dep)
if err != nil {
log.Println("restore, during restore dep:", err)
log.Printf("restore, during restore dep %q: %v\n", dep.ImportPath, err)
hadError = true
}
}
Expand Down
2 changes: 1 addition & 1 deletion version.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (
"runtime"
)

const version = 30
const version = 31

var cmdVersion = &Command{
Usage: "version",
Expand Down

0 comments on commit cf33bd7

Please sign in to comment.