diff options
author | OpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com> | 2022-10-03 12:44:39 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-10-03 12:44:39 +0200 |
commit | 5da3e1187e7c250584dc3002938be61e655e1a7b (patch) | |
tree | 3f1a3678505ffa4a75e083790368dc7d39d96f48 /cmd/podman/pods | |
parent | 84aff621f562fd90b8d5302ab7052d28f51ded0a (diff) | |
parent | 6f821f03d9e3f7a2e361177d2b301b16b2ea4866 (diff) | |
download | podman-5da3e1187e7c250584dc3002938be61e655e1a7b.tar.gz podman-5da3e1187e7c250584dc3002938be61e655e1a7b.tar.bz2 podman-5da3e1187e7c250584dc3002938be61e655e1a7b.zip |
Merge pull request #15846 from jakecorrenti/pod-logs-latest
`podman pod logs -l` no longer panics
Diffstat (limited to 'cmd/podman/pods')
-rw-r--r-- | cmd/podman/pods/logs.go | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/cmd/podman/pods/logs.go b/cmd/podman/pods/logs.go index 7093a7fa8..a0ec16976 100644 --- a/cmd/podman/pods/logs.go +++ b/cmd/podman/pods/logs.go @@ -121,5 +121,10 @@ func logs(_ *cobra.Command, args []string) error { logsPodOptions.StdoutWriter = os.Stdout logsPodOptions.StderrWriter = os.Stderr - return registry.ContainerEngine().PodLogs(registry.GetContext(), args[0], logsPodOptions.PodLogsOptions) + + podName := "" + if len(args) > 0 { + podName = args[0] + } + return registry.ContainerEngine().PodLogs(registry.GetContext(), podName, logsPodOptions.PodLogsOptions) } |