Commit e81a721
Fix log message to correctly reference invalid venv environment not conda (#788)
## Problem
The `findVirtualEnvironments` function in
`src/managers/builtin/venvUtils.ts` was logging misleading warning
messages. When encountering an invalid virtual environment (missing
prefix, executable, or version), it would log:
```
Invalid conda environment: {...}
```
However, this function is specifically designed to find and process
**venv** environments, not conda environments. The function correctly
filters for `NativePythonEnvironmentKind.venv` on line 179, making the
conda reference in the warning message incorrect and confusing for
developers debugging environment discovery issues.
## Solution
Updated the warning message on line 183 to accurately reflect the
environment type being processed:
```typescript
// Before
log.warn(`Invalid conda environment: ${JSON.stringify(e)}`);
// After
log.warn(`Invalid venv environment: ${JSON.stringify(e)}`);
```
## Impact
This change provides accurate debugging information when invalid venv
environments are encountered, making it easier for developers and users
to understand which type of environment manager is reporting the issue.
The fix is minimal and surgical, changing only the log message text
without affecting any functionality.
All existing tests continue to pass, confirming that this change doesn't
introduce any regressions.
<!-- START COPILOT CODING AGENT SUFFIX -->
Created from VS Code via the [GitHub Pull
Request](https://marketplace.visualstudio.com/items?itemName=GitHub.vscode-pull-request-github)
extension.
<!-- START COPILOT CODING AGENT TIPS -->
---
✨ Let Copilot coding agent [set things up for
you](https://github.com/microsoft/vscode-python-environments/issues/new?title=✨+Set+up+Copilot+instructions&body=Configure%20instructions%20for%20this%20repository%20as%20documented%20in%20%5BBest%20practices%20for%20Copilot%20coding%20agent%20in%20your%20repository%5D%28https://gh.io/copilot-coding-agent-tips%29%2E%0A%0A%3COnboard%20this%20repo%3E&assignees=copilot)
— coding agent works faster and does higher quality work when set up for
your repo.
---------
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: eleanorjboyd <26030610+eleanorjboyd@users.noreply.github.com>1 parent 09fdfba commit e81a721
1 file changed
+1
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
180 | 180 | | |
181 | 181 | | |
182 | 182 | | |
183 | | - | |
| 183 | + | |
184 | 184 | | |
185 | 185 | | |
186 | 186 | | |
| |||
0 commit comments