Print tested command only once

This commit is contained in:
Maciej Szulik 2024-10-01 15:28:55 +02:00
parent 22a30e7cbb
commit cabf04828e
No known key found for this signature in database
GPG Key ID: F15E55D276FA84C4

View File

@ -585,7 +585,9 @@ func StartCmdAndStreamOutput(cmd *exec.Cmd) (stdout, stderr io.ReadCloser, err e
if err != nil {
return
}
Logf("Asynchronously running '%s %s'", cmd.Path, strings.Join(cmd.Args, " "))
// cmd.Args contains command itself as 0th argument, so it's sufficient to
// print 1st and latter arguments
Logf("Asynchronously running '%s %s'", cmd.Path, strings.Join(cmd.Args[1:], " "))
err = cmd.Start()
return
}