forked fromDonJayamanne/pythonVSCode
- Notifications
You must be signed in to change notification settings - Fork1.2k
Commit79e8a13
authored
Always use environment path when running conda environment commands (#24807)
Attempt at fixing#24585There are many edge scenarious where refering to the name of theenvironment rather than the path can cause breaks in the extension. Someexamples1 -**If we have two anonymous environments with the same name indifferent folders**/path1/my-env/path2/my-env (where my active vscode python interpreter is)by using conda -n my-env it'll always use the first env.2 - **Some times people avoid actually activating their conda envs whenusing conda-pack**https://github.com/conda/conda-packThis is because the activation scripts are known to be flaky and notvery reliable3 - **The environment may have been created by a conda-compliantreplacement**Therefore conda itself is not aware of it by name but can work with itproperly using the path. This is the case of[hawk](https://community.palantir.com/t/introducing-hawk-for-python-package-management-in-code-repositories/500)or frankly anyone building their own conda package manager on top of[rattler](https://github.com/conda/rattler).Some of these points are also hinted at#24627 (comment), and supported by a conda maintainer in#24585 (comment)This PR has a minimal attempt at changing that by always forcing -pusage1 parentb4aa112 commit79e8a13
File tree
3 files changed
+9
-12
lines changed- src
- client/pythonEnvironments/common/environmentManagers
- test
- common/process
- pythonEnvironments/common/environmentManagers
3 files changed
+9
-12
lines changedLines changed: 2 additions & 5 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
564 | 564 |
| |
565 | 565 |
| |
566 | 566 |
| |
567 |
| - | |
568 |
| - | |
569 |
| - | |
570 |
| - | |
571 |
| - | |
| 567 | + | |
| 568 | + | |
572 | 569 |
| |
573 | 570 |
| |
574 | 571 |
| |
|
Lines changed: 6 additions & 6 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
284 | 284 |
| |
285 | 285 |
| |
286 | 286 |
| |
287 |
| - | |
| 287 | + | |
288 | 288 |
| |
289 | 289 |
| |
290 | 290 |
| |
291 | 291 |
| |
292 | 292 |
| |
293 | 293 |
| |
294 | 294 |
| |
295 |
| - | |
296 |
| - | |
| 295 | + | |
| 296 | + | |
297 | 297 |
| |
298 | 298 |
| |
299 | 299 |
| |
| |||
312 | 312 |
| |
313 | 313 |
| |
314 | 314 |
| |
315 |
| - | |
| 315 | + | |
316 | 316 |
| |
317 | 317 |
| |
318 | 318 |
| |
319 |
| - | |
320 |
| - | |
| 319 | + | |
| 320 | + | |
321 | 321 |
| |
322 | 322 |
| |
323 | 323 |
| |
|
Lines changed: 1 addition & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
536 | 536 |
| |
537 | 537 |
| |
538 | 538 |
| |
539 |
| - | |
| 539 | + | |
540 | 540 |
| |
541 | 541 |
| |
542 | 542 |
| |
|
0 commit comments
Comments
(0)