Skip to content

Commit

Permalink
fix: use resolved executable when applying a formatter
Browse files Browse the repository at this point in the history
We were going to the trouble of resolving the command to an executable via the PATH but were not using that executable when executing the formatting command.

Signed-off-by: Brian McGee <[email protected]>
  • Loading branch information
brianmcgee committed May 17, 2024
1 parent ff3bfaa commit 2b94480
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion format/formatter.go
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ func (f *Formatter) Apply(ctx context.Context, files []*walk.File, filter bool)
}

// execute the command
cmd := exec.CommandContext(ctx, f.config.Command, args...)
cmd := exec.CommandContext(ctx, f.executable, args...)
cmd.Dir = f.workingDir

if out, err := cmd.CombinedOutput(); err != nil {
Expand Down

0 comments on commit 2b94480

Please sign in to comment.