Skip to content

Commit

Permalink
Merge pull request #15 from aquasecurity/errors
Browse files Browse the repository at this point in the history
More debug for errors
  • Loading branch information
lizrice committed Aug 17, 2017
2 parents 2e887c2 + 0d84e8d commit 2f9795b
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion cmd/get.go
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,7 @@ var getCmd = &cobra.Command{
// Maybe this metadata was stored as an image by a previous version of manifesto
// so try getting it that way
// TODO!! Retire this one day
log.Debug("This metadata is stored in an image rather than a blob")
log.Debugf("This metadata may be stored in an image rather than a blob: %v", err)
contents, err = dockerGetData(repoName + "@" + m.Digest)
if err != nil {
fmt.Printf("Couldn't find %s data from manifesto: %v\n", metadata, err)
Expand Down
3 changes: 2 additions & 1 deletion cmd/list.go
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ var listCmd = &cobra.Command{
if imageDigest == "" {
imageDigest, err = dockerGetDigest(imageName)
if err != nil {
fmt.Printf("Image '%s' not found\n", imageName)
fmt.Printf("Image '%s' not found: %v\n", imageName, err)
os.Exit(1)
}
}
Expand All @@ -53,6 +53,7 @@ var listCmd = &cobra.Command{
raw, err := dockerGetData(metadataImageName)
if err != nil {
fmt.Printf("No manifesto data stored for image '%s'\n", imageName)
log.Debugf("%v", err)
os.Exit(1)
}
var mml MetadataManifestoList
Expand Down
2 changes: 1 addition & 1 deletion cmd/put.go
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ var putCmd = &cobra.Command{
if imageDigest == "" {
imageDigest, err = dockerGetDigest(imageName)
if err != nil {
fmt.Printf("Image '%s' not found\n", imageName)
fmt.Printf("Image '%s' not found: %v\n", imageName, err)
os.Exit(1)
}
}
Expand Down

0 comments on commit 2f9795b

Please sign in to comment.