Skip to content

Commit 749082e

Browse files
authored
Merge pull request #134 from erikh/fix-logger
cmd/oci-image-tool/validate.go: create a logger if none exists.
2 parents f47425d + 6c1f2ef commit 749082e

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

cmd/oci-image-tool/validate.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,10 @@ func validatePath(name string) error {
9393
}
9494
}
9595

96+
if v.stdout == nil {
97+
v.stdout = log.New(os.Stdout, "oci-image-tool: ", 0)
98+
}
99+
96100
switch typ {
97101
case image.TypeImageLayout:
98102
return image.ValidateLayout(name, v.refs, v.stdout)

0 commit comments

Comments
 (0)