Skip to content

(#3477) Rewrite Get-PackageParameters - #3961

Open
vexx32 wants to merge 3 commits into
chocolatey:feature/cmdletsfrom
vexx32:cmdlet/Get-PackageParameters
Open

vexx32 wants to merge 3 commits into
chocolatey:feature/cmdletsfrom
vexx32:cmdlet/Get-PackageParameters

Conversation

@vexx32

@vexx32 vexx32 commented Oct 28, 2026

Copy link
Copy Markdown
Member

Description Of Changes

  • Rewrite Get-PackageParameters cmdlet
  • Add tests
  • Tidy up the overcomplicated regex (I promise I didn't break it and there are tests to prove it 💜)

Motivation and Context

See #3477

Testing

  1. Run unit tests in VS
  2. Run Pester tests in test kitchen

Operating Systems Testing

Win11

Change Types Made

  • Bug fix (non-breaking change).
  • Feature / Enhancement (non-breaking change).
  • Breaking change (fix or feature that could cause existing functionality to change).
  • Documentation changes.
  • PowerShell code changes.

Change Checklist

  • Requires a change to the documentation.
  • Documentation has been updated.
  • Tests to cover my changes, have been added.
  • All new and existing tests passed?
  • PowerShell code changes: PowerShell v3 compatibility checked?
  • Significant design decisions: ADR has been created by a Chocolatey team member?
  • All items are complete on the Definition of Done.

Related Issue

#3477

Added some additional helpers for PowerShell cmdlets:
- Additional stream handling
- Credential prompts
- Copying files
- Resolving paths
- Setting exit codes

These will be useful for cmdlets to be added in the following commits.
@vexx32
vexx32 force-pushed the cmdlet/Get-PackageParameters branch from 42a5786 to 0e08781 Compare October 29, 2026 15:42
@vexx32
vexx32 requested a review from a team as a code owner October 29, 2026 15:42
@vexx32
vexx32 requested review from pauby and removed request for a team October 29, 2026 15:42
There wasn't a test project for Chocolatey.PowerShell so I've added one
following the approximate patterns from other test projects. Further
commits will build on this.
@vexx32
vexx32 force-pushed the cmdlet/Get-PackageParameters branch from 0e08781 to d64c145 Compare October 29, 2026 15:44
Straightforward port of the function, including tests.
The only real "change" here was cleaning up the regex after we got tests
in place to validate everything it needs to be doing.
@vexx32
vexx32 force-pushed the cmdlet/Get-PackageParameters branch from d64c145 to c51c33d Compare October 29, 2026 22:46
@vexx32 vexx32 mentioned this pull request Nov 2, 2026
13 of 44 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant