chocolatey / chocolatey/choco

Migrate to PowerShell Core as the main command runner

Open
#3,590 1 comment 0 reactions 0 assignees View on GitHub
0 - Triaging Breaking Change Enhancement
Dominant language
C#
Stars
11.5k
Forks
960
PR merge metrics
No merged PRs in 30d

Description

### Checklist

- [x] I have verified this is the correct repository for opening this issue.
- [x] I have verified no other issues exist related to my request.

### Is Your Feature Request Related To A Problem? Please describe.

PowerShell 5 is almost a decade old now, and has seen almost no support, updates, or upgrades that would make it more usable over using PowerShell Core. PS 5 is at it's end of life already, and I think it's time to move to PS Core, which will likely be default in the coming Windows versions.

### Describe The Solution. Why is it needed?

The solution is simple as installing along side Chocolatey, or repackaging it with it.

But why use PowerShell Core, and not the PowerShell installed with the system? Aside from outdated dependencies, it will eventually get changed. On top of being faster, and more maintained, it has a number of different QoLs that a Package Maintainer like me would like to use. I've been burned too many times running a script locally thinking it will work, only to realize "Oops! Forgot concatenating a Path Object and a String isn't possible in PS 5".

### Additional Context

Having PowerShell Core 6 installed along side Chocolatey would mean you could use PS 5 by default, and packages can opt into using a new runner. I find this would be the best migration path available to us. This way we don't immediately remove PS 5 support, but deprecate it, and at a later date, can decide to remove it entirely.

### Related Issues

_No response_

Contributor guide

Open the contributing guide

Research direction

The issue names no files, tests, or entry points. Start by locating how Chocolatey currently selects and invokes PowerShell 5, then map the installation and package-runner paths needed for an opt-in PowerShell Core runner. Done should preserve the existing default, provide the new runner option, and establish a deprecation path.

Written by the indexing model from the issue text.

Assessment

Tech stack
powershell
Domain
cli
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.