From a382088da87a7e73ff04b03ab1024e237e633d64 Mon Sep 17 00:00:00 2001 From: NeuralFault Date: Sun, 23 Aug 2026 21:11:47 +0000 Subject: [PATCH] fix: add bundled uv to PATH for Linux/macOS package launches - Prepend the bundled uv directory (Assets/uv) to PATH in UvVenvRunner.RunDetached on non-Windows platforms - Lets package launch scripts that invoke `uv` (e.g. Forge Neo) find it without a system install - Declare the uv path once, above the platform branches, so both Windows and non-Windows paths reuse it --- StabilityMatrix.Core/Python/UvVenvRunner.cs | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/StabilityMatrix.Core/Python/UvVenvRunner.cs b/StabilityMatrix.Core/Python/UvVenvRunner.cs index 7cb7a13f5..9be5fa043 100644 --- a/StabilityMatrix.Core/Python/UvVenvRunner.cs +++ b/StabilityMatrix.Core/Python/UvVenvRunner.cs @@ -577,12 +577,14 @@ public void RunDetached( // Disable pip caching - uses significant memory for large packages like torch // env["PIP_NO_CACHE_DIR"] = "true"; + // Add bundled uv to PATH so package launch scripts can invoke `uv` + var uvFolder = GlobalConfig.LibraryDir.JoinDir("Assets", "uv"); + // On windows, add portable git to PATH and binary as GIT if (Compat.IsWindows) { var portableGitBin = GlobalConfig.LibraryDir.JoinDir("PortableGit", "bin"); var venvBin = RootPath.JoinDir(RelativeBinPath); - var uvFolder = GlobalConfig.LibraryDir.JoinDir("Assets", "uv"); if (env.TryGetValue("PATH", out var pathValue)) { env = env.SetItem( @@ -600,11 +602,11 @@ public void RunDetached( { if (env.TryGetValue("PATH", out var pathValue)) { - env = env.SetItem("PATH", Compat.GetEnvPathWithExtensions(pathValue)); + env = env.SetItem("PATH", Compat.GetEnvPathWithExtensions(uvFolder, pathValue)); } else { - env = env.SetItem("PATH", Compat.GetEnvPathWithExtensions()); + env = env.SetItem("PATH", Compat.GetEnvPathWithExtensions(uvFolder)); } }