Removed modification of internal/build/util.go

This commit is contained in:
Matthieu Vachon 2025-02-13 15:34:39 -05:00
parent 389c881db0
commit 452901f9e9
2 changed files with 1 additions and 16 deletions

View file

@ -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

View file

@ -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...))
}