diff options
Diffstat (limited to 'build/code-batch-process.go')
-rw-r--r-- | build/code-batch-process.go | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/build/code-batch-process.go b/build/code-batch-process.go index 8139fe7623..b2290af771 100644 --- a/build/code-batch-process.go +++ b/build/code-batch-process.go @@ -40,7 +40,7 @@ func passThroughCmd(cmd string, args []string) error { } c := exec.Cmd{ Path: foundCmd, - Args: args, + Args: append([]string{cmd}, args...), Stdin: os.Stdin, Stdout: os.Stdout, Stderr: os.Stderr, @@ -271,9 +271,9 @@ func main() { log.Print("the -d option is not supported by gitea-fmt") } cmdErrors = append(cmdErrors, giteaFormatGoImports(files, containsString(subArgs, "-l"), containsString(subArgs, "-w"))) - cmdErrors = append(cmdErrors, passThroughCmd("gofumpt", append([]string{"-extra", "-lang", "1.16"}, substArgs...))) + cmdErrors = append(cmdErrors, passThroughCmd("go", append([]string{"run", os.Getenv("GOFUMPT_PACKAGE"), "-extra", "-lang", "1.17"}, substArgs...))) case "misspell": - cmdErrors = append(cmdErrors, passThroughCmd("misspell", substArgs)) + cmdErrors = append(cmdErrors, passThroughCmd("go", append([]string{"run", os.Getenv("MISSPELL_PACKAGE")}, substArgs...))) default: log.Fatalf("unknown cmd: %s %v", subCmd, subArgs) } |