PowerShell / PowerShell/vscode-powershell
Start-Job -PSVersion 5.1 does not include the Windows Powershell module user path when run in PSIC terminal
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 1.9k
- Forks
- 547
- PR merge metrics
- No merged PRs in 30d
Description
Issue Type: Bug
Reproduce
In PSIC terminal:
Start-Job -PSVersion '5.1' -ScriptBlock {$ENV:PSModulePath} | Receive-Job -Wait
Expected
PSModulePath contains $HOME\Documents\WindowsPowershell\Modules
Actual
Only contains system folders and the powershell preview extension modules folder
C:\Program Files\WindowsPowerShell\Modules;C:\WINDOWS\system32\WindowsPowerShell\v1.0\Modules;c:\Users\JGrote\.vscode-insiders\extensions\ms-vscode.powershell-preview-2021.5.0\modules
Workaround
Add back to PSModulePath as first step in the job
Extension version: 2021.5.0
VS Code version: Code - Insiders 1.57.0-insider (fe1eafc80c07608de52a2f9c99fee103dea77f5e, 2021-06-04T12:21:40.077Z)
OS version: Windows_NT x64 10.0.19043
System Info
| Item | Value |
|---|---|
| CPUs | AMD Ryzen 7 4700U with Radeon Graphics (8 x 1996) |
| GPU Status | 2d_canvas: enabled gpu_compositing: enabled multiple_raster_threads: enabled_on oop_rasterization: enabled opengl: enabled_on rasterization: enabled skia_renderer: enabled_on video_decode: enabled vulkan: disabled_off webgl: enabled webgl2: enabled |
| Load (avg) | undefined |
| Memory (System) | 15.36GB (4.84GB free) |
| Process Argv | --folder-uri file:///c%3A/Users/JGrote/Projects/PowerConfig --crash-reporter-id 4453efaa-0821-4555-88e2-3de8bad9109e |
| Screen Reader | no |
| VM | 0% |
A/B Experiments
vsliv695:30137379
vsins829:30139715
vsliv368cf:30146710
vsreu685:30147344
python383:30185418
pythonvspyt602:30291494
vspor879:30202332
vspor708:30202333
vspor363:30204092
pythonvspyt639:30291487
pythontb:30258533
vspre833cf:30267465
pythonptprofiler:30281269
vshan820:30294714
pythondataviewer:30285072
vscus158cf:30286554
pythonvsuse255:30303025
vscgsv2:30305091
vscorehov:30301224
vscod805:30301674
vscextlang:30310088
vsccppwtct:30312693
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the command in a PSIC terminal and compare PSModulePath for the 5.1 Start-Job session with the expected user module path. No source file or test is named, so trace the extension's job and session initialization; done means the user path is present without requiring a workaround.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- powershell
- Domain
- devtools
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100