Little helper to run CNCF's k3s in Docker
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
k3d/cli/run.go

19 lines
378 B

package run
import (
"log"
"os"
"os/exec"
)
// runCommand accepts the name and args and runs the specified command
func runCommand(verbose bool, name string, args ...string) error {
if verbose {
log.Printf("Running command: %+v", append([]string{name}, args...))
}
cmd := exec.Command(name, args...)
cmd.Stdout = os.Stdout
cmd.Stderr = os.Stderr
return cmd.Run()
}