From 2b944804615130f16c1cdd00526bb57e237b21b5 Mon Sep 17 00:00:00 2001 From: Brian McGee Date: Fri, 17 May 2024 09:49:41 +0100 Subject: [PATCH] fix: use resolved executable when applying a formatter 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 --- format/formatter.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/format/formatter.go b/format/formatter.go index cb70ca1b..e8e84539 100644 --- a/format/formatter.go +++ b/format/formatter.go @@ -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 {