From 754ed30b630561ff09cbe6061294ea0e7023993c Mon Sep 17 00:00:00 2001 From: Daishan Peng Date: Wed, 13 Mar 2024 15:51:11 -0700 Subject: [PATCH] Fix: Use subPath as root dir when invoking runtime Signed-off-by: Daishan Peng --- pkg/repos/get.go | 2 +- pkg/repos/runtimes/golang/golang.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/pkg/repos/get.go b/pkg/repos/get.go index db96dc8a..51ba443f 100644 --- a/pkg/repos/get.go +++ b/pkg/repos/get.go @@ -78,7 +78,7 @@ func (m *Manager) setup(ctx context.Context, runtime Runtime, tool types.Tool, e return "", nil, err } - newEnv, err := runtime.Setup(ctx, m.runtimeDir, target, env) + newEnv, err := runtime.Setup(ctx, m.runtimeDir, targetFinal, env) if err != nil { return "", nil, err } diff --git a/pkg/repos/runtimes/golang/golang.go b/pkg/repos/runtimes/golang/golang.go index 0bd890e3..9d7e29d6 100644 --- a/pkg/repos/runtimes/golang/golang.go +++ b/pkg/repos/runtimes/golang/golang.go @@ -77,7 +77,7 @@ func stripGo(env []string) (result []string) { func (r *Runtime) runBuild(ctx context.Context, toolSource, binDir string, env []string) error { log.Infof("Running go build in %s", toolSource) - cmd := debugcmd.New(ctx, filepath.Join(binDir, "go"), "build", "-o", "bin/gptscript-go-tool") + cmd := debugcmd.New(ctx, filepath.Join(binDir, "go"), "build", "-buildvcs=false", "-o", "bin/gptscript-go-tool") cmd.Env = stripGo(env) cmd.Dir = toolSource return cmd.Run()