summaryrefslogtreecommitdiff
path: root/cmd
diff options
context:
space:
mode:
Diffstat (limited to 'cmd')
-rw-r--r--cmd/podman/pods/logs.go7
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)
}