Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 1 addition & 3 deletions internal/core/local_runtime/setup_python_environment.go
Original file line number Diff line number Diff line change
Expand Up @@ -192,12 +192,10 @@ func (p *LocalPluginRuntime) installDependencies(
log.Info("uv command", "cmd", uvPath, "args", args)

virtualEnvPath := path.Join(p.State.WorkingPath, ".venv")
uvCacheDir := path.Join(p.State.WorkingPath, ".uv-cache")
uvCacheDir := path.Join(p.appConfig.PluginWorkingPath, ".uv-cache")
cmd := exec.CommandContext(ctx, uvPath, args...)
parent.SetAttributes(attribute.String("uv.path", uvPath), attribute.StringSlice("uv.args", args))
cmd.Env = append(cmd.Env, "VIRTUAL_ENV="+virtualEnvPath, "PATH="+os.Getenv("PATH"))
// set UV_CACHE_DIR to the same filesystem as the plugin working directory
// to avoid cross-device link errors (os error 95)
cmd.Env = append(cmd.Env, "UV_CACHE_DIR="+uvCacheDir)
if p.appConfig.HttpProxy != "" {
cmd.Env = append(cmd.Env, fmt.Sprintf("HTTP_PROXY=%s", p.appConfig.HttpProxy))
Expand Down
Loading