mirror of
https://github.com/coder/coder.git
synced 2026-09-22 05:05:20 +08:00
Use go run when executing goimports in gen
This commit is contained in:
@@ -96,7 +96,7 @@ func writeContents[T any](dest string, arg T, fn func(T) ([]byte, error)) error
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
cmd := exec.Command("goimports", "-w", dest)
|
||||
cmd := exec.Command("go", "run", "golang.org/x/tools/cmd/goimports@latest", "-w", dest)
|
||||
return cmd.Run()
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user