Need a better (cross-platform friendly) way to configure additional PowerShell paths
Nobody has claimed this yet.
Assessment
- Difficulty
- 5/5
- Estimated time
- Over a week
- Newbie friendliness
- 35/100
- Issue type
- Feature
- Clarity
- Needs clarification
- Activity status
- Quiet
- Tech stack
- powershell, typescript
- Domain
- developer-experience, tooling
Research direction
No source file or test is named. Start by locating the code that reads powershell.powerShellAdditionalExePaths and powershell.powerShellDefaultVersion, then review how executable discovery and platform filtering work; done means a cross-platform additionalPowerShellLocations configuration works without breaking the existing settings.
Written by the indexing model from the issue text.
Description
Prerequisites
- I have written a descriptive issue title.
- I have searched all issues to ensure it has not already been reported.
Summary
Context
-
I use PowerShell across operating systems
-
I customized additional PowerShell executables for vscode-powershell using
powerShellAdditionalExePaths:"powershell.powerShellAdditionalExePaths": { "PowerShell 7.5 (macOS)": "/opt/homebrew/bin/pwsh", "PowerShell 7 (Windows)": "C:/<path>/<to>/pwsh.exe" }, "powershell.powerShellDefaultVersion": "PowerShell 7 (Windows)", -
I'm syncing and reusing my vscode settings across operating systems
The problem
Every time I work with PowerShell files I have to bear the annoying warning of addtional executable I've configured for the other platform not being found.
Proposed Design
Introduce a new cross-platform/syncing firendly way to customize additional executables
Proposed interface:
type OS = "Windows" | "macOS" | "Linux"
interface AddtionalPowerShellLocation {
name: String
path: String
os: OS
default: Boolean | undefined
}
type Locations = AddtionalPowerShellLocation[]
To not break[^1] existing powerShellAdditionalExePaths, it'd be a new additionalPowerShellLocations key for holding these locations:
"powershell.additionalPowerShellLocations": [
{
"name": "PowerShell 7",
"path": "/opt/powershell/pwsh",
"os": "macOS",
"default": true
},
{
"name": "PowerShell 7",
"path": "C:/PowerShell/stable/pwsh.exe",
"os": "Windows",
"default": true
},
{
"name": "PowerShell Nightly",
"path": "C:/PowerShell/nightly/pwsh.exe",
"os": "Windows"
},
{
"name": "PowerShell Nightly",
"path": "/opt/powershell-nightly/pwsh",
"os": "macOS"
},
{
"name": "PowerShell 7",
"path": "/opt/powershell7/pwsh",
"os": "Linux"
}
]
Then vscode-powershell can filter out items that are not for the target platform, and launch the first additonal PowerShell executable it successfully resolved. Nothing changes for system fallbacks in this proposal.
powerShellAdditionalExePaths and powerShellDefaultVersion then could be marked as deprecated.
The proposed design might not be optimal, so please comment.
[^1]: It was a breaking change when powerShellAdditionalExePaths was introduced https://github.com/PowerShell/vscode-powershell/issues/4167
- Dominant language
- TypeScript
- Stars
- 1.9k
- Forks
- 548
- PR merge metrics
- No merged PRs in 30d
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.
More from PowerShell/vscode-powershell
-
agentic-workflows
Difficulty 2/5 1-3 hours Newbie friendliness 62/100
PowerShell/vscode-powershell#5599 · 3 comments ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
PowerShell/vscode-powershell#5592 · 2 comments · 1 reaction ·
-
agentic-workflows
Difficulty 2/5 1-3 hours Newbie friendliness 62/100
PowerShell/vscode-powershell#5583 · 1 comment ·
-
powershell.scriptAnalysis.settingsPath (Description): Warning Message Should Provide A Workaround OpenArea-Code Formatting Issue-Enhancement
Difficulty 1/5 Under an hour Newbie friendliness 68/100
PowerShell/vscode-powershell#4653 · 3 comments · 4 reactions ·
-
nothing OpenIssue-Bug Needs: Triage
Difficulty 5/5 Over a week Newbie friendliness 5/100
PowerShell/vscode-powershell#5603 · 1 reaction ·
All issues in PowerShell/vscode-powershell
Similar issues
-
Browser Waiting for: Product Owner
Difficulty 2/5 1-3 hours Newbie friendliness 85/100
getsentry/sentry-javascript#24577 · 1 comment ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
agilepathway/label-checker#640 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
copse-dev/agent-pane#2953 ·
-
agentic-workflows
Difficulty 1/5 Under an hour Newbie friendliness 85/100
githubnext/rig#534 ·
-
automation missing-model model-sync provider:pioneer
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
anomalyco/models.dev#7701 ·