diff --git a/gnovm/pkg/gnolang/internal/softfloat/gen/main.go b/gnovm/pkg/gnolang/internal/softfloat/gen/main.go index 37723e1970d..aaa63aef4a4 100644 --- a/gnovm/pkg/gnolang/internal/softfloat/gen/main.go +++ b/gnovm/pkg/gnolang/internal/softfloat/gen/main.go @@ -5,6 +5,7 @@ import ( "log" "os" "os/exec" + "path/filepath" "runtime" "strings" ) @@ -82,8 +83,13 @@ func processSoftFloat64TestFile() { } func gofumpt() { - cmd := exec.Command("go", "run", "-modfile", "../../../../../misc/devdeps/go.mod", "mvdan.cc/gofumpt", "-w", ".") - _, err := cmd.Output() + rootPath, err := exec.Command("git", "rev-parse", "--show-toplevel").Output() + if err != nil { + log.Fatal("error git rev-parse:", err) + } + + cmd := exec.Command("go", "run", "-modfile", filepath.Join(strings.TrimSpace(string(rootPath)), "misc/devdeps/go.mod"), "mvdan.cc/gofumpt", "-w", ".") + _, err = cmd.Output() if err != nil { log.Fatal("error gofumpt:", err) }