Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Sep 4, 2025

Issue

The findVirtualEnvironments function in src/managers/builtin/venvUtils.ts contained an incorrect error message that referenced "conda environment" when it should reference "venv environment".

Root Cause

Line 183 in the findVirtualEnvironments function logged:

log.warn(`Invalid conda environment: ${JSON.stringify(e)}`);

This is incorrect because:

  • The function specifically handles virtual environments (venv), not conda environments
  • It filters for NativePythonEnvironmentKind.venv environments only
  • The function is located in venvUtils.ts, not condaUtils.ts
  • The success message correctly references "venv environment"

Fix

Updated the error message to correctly reference the environment type:

log.warn(`Invalid venv environment: ${JSON.stringify(e)}`);

This ensures consistency with:

  • The function's purpose (finding virtual environments)
  • The success log message on line 189: Found venv environment: ${env.name}
  • Similar error patterns in conda utilities that correctly reference "conda environment"

Testing

  • All existing unit tests (128) continue to pass
  • Code compiles without errors
  • Linting passes with no new warnings
  • No functional changes, only corrected error messaging

Created from VS Code via the GitHub Pull Request extension.


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

Copilot AI changed the title [WIP] update to correctly reference invalid venv environment not conda Fix incorrect conda reference in venv environment error message Sep 4, 2025
Copilot AI requested a review from eleanorjboyd September 4, 2025 20:22
Copilot AI mentioned this pull request Sep 4, 2025
9 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants