We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 5b4a08d commit c87dc00Copy full SHA for c87dc00
internal/run/run.go
@@ -5,6 +5,7 @@ import (
5
"fmt"
6
"os"
7
"os/exec"
8
+ "path/filepath"
9
"strings"
10
)
11
@@ -42,7 +43,9 @@ type cmdWithStderr struct {
42
43
44
func (c cmdWithStderr) Output() ([]byte, error) {
45
if os.Getenv("DEBUG") != "" {
- fmt.Fprintf(os.Stderr, "%v\n", c.Cmd.Args)
46
+ // print commands, but omit the full path to an executable
47
+ debugArgs := append([]string{filepath.Base(c.Cmd.Args[0])}, c.Cmd.Args[1:]...)
48
+ fmt.Fprintf(os.Stderr, "%v\n", debugArgs)
49
}
50
if c.Cmd.Stderr != nil {
51
return c.Cmd.Output()
0 commit comments