Skip to content

Commit

Permalink
refactor(tooling): add verbose handling to RunTool
Browse files Browse the repository at this point in the history
  • Loading branch information
sheldonhull committed Sep 17, 2021
1 parent 5d2f528 commit 40e7d21
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions tooling/tooling.go
Expand Up @@ -6,6 +6,7 @@ import (
"path/filepath"
"runtime"

"github.com/magefile/mage/mg"
"github.com/magefile/mage/sh"
"github.com/pterm/pterm"
)
Expand Down Expand Up @@ -99,6 +100,9 @@ func RunTool(cmd string, args ...string) error {
if runtime.GOOS == "windows" {
extension = ".exe"
}
if mg.Verbose() {
return sh.RunV(filepath.Join("_tools", cmd+extension), args...)
}

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

0 comments on commit 40e7d21

Please sign in to comment.