Need a better (cross-platform friendly) way to configure additional PowerShell paths
Đánh giá
- Độ khó
- 5/5
- Thời gian dự kiến
- Hơn một tuần
- Mức phù hợp với người mới
- 35/100
- Loại issue
- Tính năng
- Độ rõ ràng
- Cần làm rõ
- Mức độ hoạt động
- Ít trao đổi
- Công nghệ
- powershell, typescript
- Lĩnh vực
- developer-experience, tooling
Hướng nghiên cứu
Không có tệp nguồn hay bài kiểm thử nào được nêu tên. Hãy bắt đầu bằng cách xác định mã đọc powershell.powerShellAdditionalExePaths và powershell.powerShellDefaultVersion, sau đó xem xét cách hoạt động của việc phát hiện tệp thực thi và lọc theo nền tảng; hoàn thành nghĩa là cấu hình additionalPowerShellLocations đa nền tảng hoạt động mà không làm hỏng các cài đặt hiện có.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
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
- Ngôn ngữ chính
- TypeScript
- Star
- 1.9k
- Fork
- 551
- Chỉ số merge pull request
- Không có pull request nào được merge trong 30 ngày
Chuẩn bị môi trường
- Không có Dockerfile hay tệp Docker Compose
- Có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của PowerShell/vscode-powershell
-
[aw] Agentic Issue Triage failedĐang mởagentic-workflows
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
PowerShell/vscode-powershell#5615 · 1 bình luận ·
-
agentic-workflows
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
PowerShell/vscode-powershell#5607 ·
-
[aw] Agentic Issue Triage failedĐang mởagentic-workflows
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 62/100
PowerShell/vscode-powershell#5599 · 3 bình luận ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
PowerShell/vscode-powershell#5592 · 2 bình luận · 1 reaction ·
-
[aw] Agentic Issue Triage failedĐang mởagentic-workflows
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 62/100
PowerShell/vscode-powershell#5583 · 1 bình luận ·
Tất cả issue của PowerShell/vscode-powershell
Issue tương tự
-
Độ khó 1/5 1-3 giờ Mức phù hợp với người mới 84/100
Maintainer thường phản hồi trong vòng 1 ngày
-
core
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 70/100
vectorize-io/hindsight#5457 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
beginner friendly community contributions-welcome good first issue hacktoberfest help wanted testing up-for-grabs
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 85/100
lukilabs/beautiful-mermaid#160 ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 66/100
rescript-lang/rescript-lang.org#1420 ·
Maintainer thường phản hồi trong vòng 2 ngày