Skip to content
This repository was archived by the owner on Jun 26, 2026. It is now read-only.
Open
Show file tree
Hide file tree
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: 4 additions & 0 deletions src/virtualEnvironment.ts
Original file line number Diff line number Diff line change
Expand Up @@ -164,6 +164,10 @@ export class VirtualEnvironment implements HasTelemetry, PythonExecutor {
get uvEnv() {
return {
VIRTUAL_ENV: this.venvPath,
// The bundled uv must remain hermetic: ignore user/system/project uv config
// files (e.g. ~/.config/uv/uv.toml) so settings like `exclude-newer` cannot
// interfere with dependency resolution. See issue #1722.
UV_NO_CONFIG: '1',
// Empty strings are not valid values for these env vars,
// dropping them here to avoid passing them to uv.
// `node-pty` does not support `undefined`.
Expand Down
7 changes: 7 additions & 0 deletions tests/unit/virtualEnvironment.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -294,6 +294,13 @@ describe('VirtualEnvironment', () => {
expect('UV_PYTHON_INSTALL_MIRROR' in uvEnv).toBe(false);
});

test('always sets UV_NO_CONFIG=1 so bundled uv ignores user/system uv.toml', ({ virtualEnv }) => {
// Regression test for https://github.com/Comfy-Org/desktop/issues/1722.
// A user-level uv.toml with settings like `exclude-newer` would otherwise
// be applied to the bundled uv and break dependency resolution.
expect(virtualEnv.uvEnv.UV_NO_CONFIG).toBe('1');
});

test('omits UV_PYTHON_INSTALL_MIRROR when pythonMirror is empty string', () => {
vi.stubGlobal('process', {
...process,
Expand Down