From 98da2fa80657fecb6b083eaf68974d2ee2f84e6a Mon Sep 17 00:00:00 2001 From: Jhon Honce Date: Mon, 3 Aug 2020 15:41:25 -0700 Subject: Refactor parsing to not require --remote to be first Use cobra.Command.FParseErrWhitelist to no longer require --remote to be the first argument in flags when using CLI Signed-off-by: Jhon Honce --- test/utils/utils.go | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'test') diff --git a/test/utils/utils.go b/test/utils/utils.go index 2c454f532..b279a7084 100644 --- a/test/utils/utils.go +++ b/test/utils/utils.go @@ -207,6 +207,10 @@ func WaitContainerReady(p PodmanTestCommon, id string, expStr string, timeout in // OutputToString formats session output to string func (s *PodmanSession) OutputToString() string { + if s == nil || s.Out == nil || s.Out.Contents() == nil { + return "" + } + fields := strings.Fields(string(s.Out.Contents())) return strings.Join(fields, " ") } -- cgit v1.2.3-54-g00ecf