You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Vscode 1.104 Testing Panel does not see the $PATH anymore #25682
I'm using Run Test. But Debug Test and Run Test with Coverage fail the same way.
I have Python Environments extension. With or without it, the issue is there.
I work on a Mac and I use homebrew. I don't do anything special for the $PATH, never needed. If I run pytest in my vscode terminal, the integration tests passed fine, no wonder, since which typst is in the $PATH.
But something happened in Vscode v1.104 and when I run the Testing via GUI it fails.
FYI, I circumvented this development issue by embedding the binary in my python package. But the issue is there, and with v1.103 it was not.
And then you'll see that, for Mac users with homebrew, /opt/homebrew/bin/ is not there. But the python env is, e.g. .pyenv/versions/3.12.11/envs/mbpdfgen/bin.
Perhaps it's just a matter of configuration, but I frankly don't know where to add e.g. /opt/homebrew/bin/.
Issue: Tests run via the Testing Panel on macOS are missing /opt/homebrew/bin and other system paths from their PATH environment variable (only showing /usr/bin:/bin:/usr/sbin:/sbin - 29 chars vs expected ~500+ chars). Tests work fine when run in the integrated terminal.
idea of cause?
The Extension Host process starts with a truncated PATH (just /usr/bin:/bin:/usr/sbin:/sbin). Previously (1.103), activation happened via shell profile modification which may have ensured the full PATH was available. Now with shell integration scripts (1.104), there may be a timing issue where:
Tests start running via runInBackground (Python Envs extension path)
User's actual shell PATH: ~500+ chars (includes /opt/homebrew/bin)
The PATH is already truncated when we first access it in our activation code
I could (on the testing side) explicitly query the user's login shell to get the full PATH in activation/service.ts. But this doesn't feel like the best option. What are your thoughts Anthony Kim (@anthonykim1)? What is the expected experience here?
Because we have not heard back with the information we requested, we are closing this issue for now. If you are able to provide the info later on, then we will be happy to re-open this issue to pick up where we left off.
Which means it never have had access to shell integration nor the profile stuff.
Maybe this just used to somehow work in python extension then user got rolled into env ext experiment.
I don't remember us touching PATH ever since the old python terminal env var experiment stuff. I dont even know if this even matters since the issue only seem to happen when not in terminal.
For env extension we could try spawning like a dummy shell before spawnProcess and make it inherit the missing path?
Because we have not heard back with the information we requested, we are closing this issue for now. If you are able to provide the info later on, then we will be happy to re-open this issue to pick up where we left off.
Activity
eleanorjboyd commentedon Sep 12, 2025
Few questions:
alanwilter commentedon Sep 15, 2025
I'm using
Run Test. ButDebug TestandRun Test with Coveragefail the same way.I have
Python Environmentsextension. With or without it, the issue is there.I work on a Mac and I use
homebrew. I don't do anything special for the$PATH, never needed. If I runpytestin myvscodeterminal, the integration tests passed fine, no wonder, sincewhich typstis in the $PATH.But something happened in Vscode v1.104 and when I run the Testing via GUI it fails.
FYI, I circumvented this development issue by embedding the binary in my python package. But the issue is there, and with v1.103 it was not.
eleanorjboyd commentedon Dec 15, 2025
Hi! Sorry on the delay here- are you still facing this issue?
alanwilter commentedon Dec 16, 2025
The answer is yes and no.
You can use Vscode debug mode to peek
r1.stdout:And then you'll see that, for Mac users with homebrew,
/opt/homebrew/bin/is not there. But the python env is, e.g..pyenv/versions/3.12.11/envs/mbpdfgen/bin.Perhaps it's just a matter of configuration, but I frankly don't know where to add e.g.
/opt/homebrew/bin/.eleanorjboyd commentedon Dec 17, 2025
Looping in Anthony Kim (@anthonykim1) - Potential Interaction with Activation Hooks Change
Issue: Tests run via the Testing Panel on macOS are missing
/opt/homebrew/binand other system paths from their PATH environment variable (only showing/usr/bin:/bin:/usr/sbin:/sbin- 29 chars vs expected ~500+ chars). Tests work fine when run in the integrated terminal.idea of cause?
The Extension Host process starts with a truncated PATH (just
/usr/bin:/bin:/usr/sbin:/sbin). Previously (1.103), activation happened via shell profile modification which may have ensured the full PATH was available. Now with shell integration scripts (1.104), there may be a timing issue where:runInBackground(Python Envs extension path)Diagnostic logging shows:
process.env.PATH: 29 chars (truncated)/opt/homebrew/bin)I could (on the testing side) explicitly query the user's login shell to get the full PATH in
activation/service.ts. But this doesn't feel like the best option. What are your thoughts Anthony Kim (@anthonykim1)? What is the expected experience here?github-actions commentedon Jan 17, 2026
Because we have not heard back with the information we requested, we are closing this issue for now. If you are able to provide the info later on, then we will be happy to re-open this issue to pick up where we left off.
Happy Coding!
anthonykim1 commentedon Jan 29, 2026
I dont think we spawn terminal when running tests via testing panel, but rather we seem to spawnProcess like: https://github.com/microsoft/vscode-python-environments/blob/d0edb908470e408dcab9c7641aa9eb206462e4b6/src/features/execution/runInBackground.ts#L42-L45
Which means it never have had access to shell integration nor the profile stuff.
Maybe this just used to somehow work in python extension then user got rolled into env ext experiment.
I don't remember us touching PATH ever since the old python terminal env var experiment stuff. I dont even know if this even matters since the issue only seem to happen when not in terminal.
For env extension we could try spawning like a dummy shell before
spawnProcessand make it inherit the missing path?github-actions commentedon Mar 1, 2026
Because we have not heard back with the information we requested, we are closing this issue for now. If you are able to provide the info later on, then we will be happy to re-open this issue to pick up where we left off.
Happy Coding!