Skip to content

Commit 6c1f2ef

Browse files
author
Erik Hollensbe
committed
cmd/oci-image-tool/validate.go: create a logger if none exists.
Signed-off-by: Erik Hollensbe <[email protected]>
1 parent a4708e3 commit 6c1f2ef

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
@@ -96,6 +96,10 @@ func validatePath(name string) error {
9696
}
9797
}
9898

99+
if v.stdout == nil {
100+
v.stdout = log.New(os.Stdout, "oci-image-tool: ", 0)
101+
}
102+
99103
switch typ {
100104
case image.TypeImageLayout:
101105
return image.ValidateLayout(name, v.refs, v.stdout)

0 commit comments

Comments
 (0)