builder: add support for -x flag

Print commands as they are executed with the -x flag. This is not yet
complete: library builds don't print commands yet. But it's a step
closer.
This commit is contained in:
Ayke van Laethem
2021-03-12 17:14:42 +01:00
committed by Ron Evans
parent fb03787b73
commit 896a848001
3 changed files with 7 additions and 1 deletions
+1 -1
View File
@@ -93,7 +93,7 @@ func copyFile(src, dst string) error {
// executeCommand is a simple wrapper to exec.Cmd
func executeCommand(options *compileopts.Options, name string, arg ...string) *exec.Cmd {
if options.PrintCommands {
fmt.Printf("%s %s\n ", name, strings.Join(arg, " "))
fmt.Printf("%s %s\n", name, strings.Join(arg, " "))
}
return exec.Command(name, arg...)
}