util: Nil input to our simple cmd helper should be allowed
Don't panic here!
This commit is contained in:
@@ -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
|
err := cmd.Wait() // we can unblock this with the timeout
|
||||||
out := b.String()
|
out := b.String()
|
||||||
|
|
||||||
if opts.LogOutput != "" {
|
if opts != nil && opts.LogOutput != "" {
|
||||||
if err := os.WriteFile(opts.LogOutput, b.Bytes(), 0600); err != nil {
|
if err := os.WriteFile(opts.LogOutput, b.Bytes(), 0600); err != nil {
|
||||||
logf("unable to store log: %v", err)
|
logf("unable to store log: %v", err)
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
Reference in New Issue
Block a user