Doesn't detect pwsh installed from Scoop #1889

Closed
opened 2026-01-30 22:41:06 +00:00 by claunia · 3 comments
Owner

Originally created by @NatoBoram on GitHub (Jun 22, 2019).

Environment

Windows build number: Microsoft Windows [Version 10.0.18912.1001]
Windows Terminal version (if applicable): 0.2.1715.0

Steps to reproduce

  1. Install PowerShell Core via Scoop with an empty profiles.json.

Expected behavior

Just like when pwsh is in C:\Program Files\PowerShell\, Terminal should generate a configuration using PowerShell Core by default.

Actual behavior

PowerShell is used instead, and PowerShell Core doesn't appear in the list.

Other

One way around this bug is to run the following command :

mklink /J "C:\Program Files\PowerShell\6" "C:\ProgramData\scoop\apps\pwsh\current"

This suggests that the path for PowerShell Core was hard-coded inside the application instead of looking for pwsh in the %PATH%, like a normal program should.

If someone is looking for PowerShell Core's default profile, here it is.

{
    "acrylicOpacity": 0.5,
    "closeOnExit": true,
    "colorScheme": "Campbell",
    "commandline": "C:\\Program Files\\PowerShell\\6\\pwsh.exe",
    "cursorColor": "#FFFFFF",
    "cursorShape": "bar",
    "fontFace": "Consolas",
    "fontSize": 10,
    "guid": "{574e775e-4f2a-5b96-ac1e-a2962a402336}",
    "historySize": 9001,
    "icon": "ms-appx:///ProfileIcons/{574e775e-4f2a-5b96-ac1e-a2962a402336}.png",
    "name": "PowerShell Core",
    "padding": "0, 0, 0, 0",
    "snapOnInput": true,
    "startingDirectory": "%USERPROFILE%",
    "useAcrylic": false
},
Originally created by @NatoBoram on GitHub (Jun 22, 2019). <!-- This bug tracker is monitored by Windows Terminal development team and other technical folks. **Important: When reporting BSODs or security issues, DO NOT attach memory dumps, logs, or traces to Github issues**. Instead, send dumps/traces to secure@microsoft.com, referencing this GitHub issue. Please use this form and describe your issue, concisely but precisely, with as much detail as possible. --> # Environment ```none Windows build number: Microsoft Windows [Version 10.0.18912.1001] Windows Terminal version (if applicable): 0.2.1715.0 ``` # Steps to reproduce <!-- A description of how to trigger this bug. --> 1. Install [PowerShell Core](https://github.com/ScoopInstaller/Main/blob/master/bucket/pwsh.json) via [Scoop](https://github.com/lukesampson/scoop) with an empty `profiles.json`. # Expected behavior Just like when `pwsh` is in `C:\Program Files\PowerShell\`, Terminal should generate a configuration using PowerShell Core by default. # Actual behavior PowerShell is used instead, and PowerShell Core doesn't appear in the list. # Other One way around this bug is to run the following command : ```cmd mklink /J "C:\Program Files\PowerShell\6" "C:\ProgramData\scoop\apps\pwsh\current" ``` This suggests that the path for PowerShell Core was hard-coded inside the application instead of looking for `pwsh` in the `%PATH%`, like a normal program should. If someone is looking for PowerShell Core's default profile, here it is. ```json { "acrylicOpacity": 0.5, "closeOnExit": true, "colorScheme": "Campbell", "commandline": "C:\\Program Files\\PowerShell\\6\\pwsh.exe", "cursorColor": "#FFFFFF", "cursorShape": "bar", "fontFace": "Consolas", "fontSize": 10, "guid": "{574e775e-4f2a-5b96-ac1e-a2962a402336}", "historySize": 9001, "icon": "ms-appx:///ProfileIcons/{574e775e-4f2a-5b96-ac1e-a2962a402336}.png", "name": "PowerShell Core", "padding": "0, 0, 0, 0", "snapOnInput": true, "startingDirectory": "%USERPROFILE%", "useAcrylic": false }, ```
claunia added the Resolution-By-DesignNeeds-TriageNeeds-Tag-Fix labels 2026-01-30 22:41:06 +00:00
Author
Owner

@DHowett-MSFT commented on GitHub (Jun 24, 2019):

There's an infinite number of places one could install powershell, honestly. I might keep mine at C:\\shells\\whatever\\pwsh.exe -- i'm not sure we should open the endless bucket of work that could come from trying to detect every shell everywhere.

@DHowett-MSFT commented on GitHub (Jun 24, 2019): There's an infinite number of places one could install powershell, honestly. I might keep mine at `C:\\shells\\whatever\\pwsh.exe` -- i'm not sure we should open the endless bucket of work that could come from trying to detect every shell everywhere.
Author
Owner

@AndASM commented on GitHub (Sep 13, 2020):

Looks like it's been added now... But also, wouldn't the standard Windows way to handle this be either search the PATH environment variable or use a registry key to identify the default install?

The infinite paths seems like a pretty standard regularly occurring problem for which there are standard generic solutions?

@AndASM commented on GitHub (Sep 13, 2020): Looks like it's been added now... But also, wouldn't the standard Windows way to handle this be either search the PATH environment variable or use a registry key to identify the default install? The infinite paths seems like a pretty standard regularly occurring problem for which there are standard generic solutions?
Author
Owner

@hgtok commented on GitHub (Jun 2, 2025):

terminal is now able to detect from scoop default directory
hence a more generic workaround using mklink

mklink /J "%USERPROFILE%\scoop" "%SCOOP%"
@hgtok commented on GitHub (Jun 2, 2025): terminal is now able to detect from scoop default directory hence a more generic workaround using mklink ``` mklink /J "%USERPROFILE%\scoop" "%SCOOP%" ```
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#1889