From 390882f36ddfa51a36a156e0f425ed4caa538e03 Mon Sep 17 00:00:00 2001 From: filtered <176114999+webfiltered@users.noreply.github.com> Date: Thu, 30 Jan 2025 03:56:07 +1100 Subject: [PATCH] Fix uv blocks install and maintenance tasks (#763) Setting uv mirror to undefined causes it to set the environment var as an empty string. --- src/virtualEnvironment.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/virtualEnvironment.ts b/src/virtualEnvironment.ts index 8392f7db..1cc72f32 100644 --- a/src/virtualEnvironment.ts +++ b/src/virtualEnvironment.ts @@ -125,7 +125,7 @@ export class VirtualEnvironment implements HasTelemetry { VIRTUAL_ENV: this.venvPath, // Empty strings are not valid values for these env vars, // dropping them here to avoid passing them to uv. - UV_PYTHON_INSTALL_MIRROR: this.pythonMirror || undefined, + ...(this.pythonMirror ? { UV_PYTHON_INSTALL_MIRROR: this.pythonMirror } : {}), }; if (!this.uvPty) {