From 16992d5c5c854850e68ab1cae84a05cb567b2508 Mon Sep 17 00:00:00 2001 From: Gerrit Date: Thu, 24 Aug 2023 15:03:21 +0200 Subject: [PATCH] Use strings.Fields. --- cmd/internal/utils/cmd.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmd/internal/utils/cmd.go b/cmd/internal/utils/cmd.go index 9841b1b..d8e2fdc 100644 --- a/cmd/internal/utils/cmd.go +++ b/cmd/internal/utils/cmd.go @@ -50,7 +50,7 @@ func runCommandWithOutput(cmd *exec.Cmd, combinedOutput bool) (string, error) { func (c *CmdExecutor) ExecWithStreamingOutput(ctx context.Context, command string) error { command = os.ExpandEnv(command) - parts := strings.Split(command, " ") + parts := strings.Fields(command) cmd := exec.CommandContext(ctx, parts[0], parts[1:]...) // nolint:gosec