From 8c886bbe7c6043015fff78ead434a3bc6ca61af8 Mon Sep 17 00:00:00 2001 From: James Shubin Date: Fri, 25 Oct 2024 18:17:04 -0400 Subject: [PATCH] util: Nil input to our simple cmd helper should be allowed Don't panic here! --- util/exec.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/util/exec.go b/util/exec.go index f9bd46cf..d6ab5a0f 100644 --- a/util/exec.go +++ b/util/exec.go @@ -82,7 +82,7 @@ func SimpleCmd(ctx context.Context, name string, args []string, opts *SimpleCmdO err := cmd.Wait() // we can unblock this with the timeout out := b.String() - if opts.LogOutput != "" { + if opts != nil && opts.LogOutput != "" { if err := os.WriteFile(opts.LogOutput, b.Bytes(), 0600); err != nil { logf("unable to store log: %v", err) } else {