Skip to content

Commit

Permalink
feat: log out the formatter command being applied at debug level
Browse files Browse the repository at this point in the history
Closes #292

Signed-off-by: Brian McGee <[email protected]>
  • Loading branch information
brianmcgee committed May 17, 2024
1 parent 2b94480 commit 3c264c6
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions format/formatter.go
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,9 @@ func (f *Formatter) Apply(ctx context.Context, files []*walk.File, filter bool)
cmd := exec.CommandContext(ctx, f.executable, args...)
cmd.Dir = f.workingDir

// log out the command being executed
f.log.Debugf("executing: %s", cmd.String())

if out, err := cmd.CombinedOutput(); err != nil {
if len(out) > 0 {
_, _ = fmt.Fprintf(os.Stderr, "%s error:\n%s\n", f.name, out)
Expand Down

0 comments on commit 3c264c6

Please sign in to comment.