microsoft / PowerToys

Windows system utilities to maximize productivity
MIT License
111.35k stars 6.55k forks source link

Environment variables of dust path is missing when alacritty is started via Powertoys Run #34757

Open zxcthezero opened 2 months ago

zxcthezero commented 2 months ago

Microsoft PowerToys version

0.84.0

Installation method

PowerToys auto-update

Running as admin

No

Area(s) with issue?

PowerToys Run

Steps to reproduce

Alacritty will miss the environment variable of dust path when launched by Powertoys Run, whereas windows terminal does not have this issue. If I launch Alacritty directly, Alacritty can use dust normally. I'm not sure if it's a issue with alacritty or with Powertoys Run.

✔️ Expected Behavior

alacritty_DAU8ZlurLM

❌ Actual Behavior

alacritty_1Ubhp2gjjL

Other Software

Alacritty 0.13.2 (installed via winget) dust 1.0.0 (installed via winget)

shnacls commented 3 weeks ago

Ran into this same issue with installing vim through win-get.

I added C:\Program Files\Vim\vim91 to the Path environment variables through sysdm.cpl, however when opening pwsh.exe or cmd.exe through PowerToys Run I would get this same error when trying to run vim from either open shell vim: The term 'vim' is not recognized as a name of a cmdlet, function, script file, or executable program.. Opening cmd or pwsh from the Windows Start Menu would not show this error and instead would start vim correctly. I checked the output of $env:PATH in pwsh opened from the Windows Start Menu and it displayed the entry C:\Program Files\Vim\vim91 that I had added earlier. Opening pwsh.exe or cmd.exe through PowerToys Run did not display an output for $env:path that was updated to include the entry which I had added.

Exiting PowerToys and opening the program again resolved the issue and PowerToys Run would then open cmd.exe or pwsh.exe with an updated Path variable that included the entry I had added while PowerToys was open. I assume this will also apply for other shells such as Alacritty.