From 452901f9e977869266a40a812b5609c767cb80ae Mon Sep 17 00:00:00 2001 From: Matthieu Vachon Date: Thu, 13 Feb 2025 15:34:39 -0500 Subject: [PATCH] Removed modification of `internal/build/util.go` --- build/ci.go | 2 +- internal/build/util.go | 15 --------------- 2 files changed, 1 insertion(+), 16 deletions(-) diff --git a/build/ci.go b/build/ci.go index 479a151365..b199f33db8 100644 --- a/build/ci.go +++ b/build/ci.go @@ -730,7 +730,7 @@ func doDockerBuildx(cmdline []string) { tags = []string{"stable-fh" + tracers.FirehoseProtocolVersion, "v" + version.Semantic + "-fh" + tracers.FirehoseProtocolVersion} } // Need to create a mult-arch builder - build.RunCommand("docker", "buildx", "create", "--use", "--name", "multi-arch-builder", "--platform", *platform) + build.MustRunCommand("docker", "buildx", "create", "--use", "--name", "multi-arch-builder", "--platform", *platform) for _, spec := range []struct { file string diff --git a/internal/build/util.go b/internal/build/util.go index 11b0d05dad..aee8bf0fc8 100644 --- a/internal/build/util.go +++ b/internal/build/util.go @@ -36,17 +36,6 @@ import ( var DryRunFlag = flag.Bool("n", false, "dry run, don't execute commands") -func Run(cmd *exec.Cmd) { - fmt.Println(">>>", printArgs(cmd.Args)) - if !*DryRunFlag { - cmd.Stderr = os.Stderr - cmd.Stdout = os.Stdout - if err := cmd.Run(); err != nil { - fmt.Println("Command error: " + err.Error()) - } - } -} - // MustRun executes the given command and exits the host process for // any error. func MustRun(cmd *exec.Cmd) { @@ -74,10 +63,6 @@ func printArgs(args []string) string { return s.String() } -func RunCommand(cmd string, args ...string) { - Run(exec.Command(cmd, args...)) -} - func MustRunCommand(cmd string, args ...string) { MustRun(exec.Command(cmd, args...)) }