Skip to content

Commit 40e7d21

Browse files
committed
refactor(tooling): add verbose handling to RunTool
1 parent 5d2f528 commit 40e7d21

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

tooling/tooling.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ import (
66
"path/filepath"
77
"runtime"
88

9+
"github.com/magefile/mage/mg"
910
"github.com/magefile/mage/sh"
1011
"github.com/pterm/pterm"
1112
)
@@ -99,6 +100,9 @@ func RunTool(cmd string, args ...string) error {
99100
if runtime.GOOS == "windows" {
100101
extension = ".exe"
101102
}
103+
if mg.Verbose() {
104+
return sh.RunV(filepath.Join("_tools", cmd+extension), args...)
105+
}
102106

103107
return sh.Run(filepath.Join("_tools", cmd+extension), args...)
104108
}

0 commit comments

Comments
 (0)