microsoft / microsoft/winget-cli

allow to specify powershell edition for dsc resource

Open
#4,715 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Issue-Feature PowerShell
Dominant language
C++
Stars
26.4k
Forks
1.8k
Avg merge
1d 11h
Merged PRs (30d)
15

Description

Description of the new feature / enhancement

I want to use winget configure to change content of existing file. For this i wanted to use ReplaceText resource from FileContentDsc module. But it fails with The configuration unit failed while attempting to test the current system state. Cannot process argument transformation on parameter 'Encoding'. 'byte' is not a supported encoding name. For information on defining a custom encoding, see the documentation for the Encoding.RegisterProvider method. (Parameter 'name') because this resource uses Get-Content -Encoding byte which is not supported in core edition but supported in desktop edition. Adding an option to select powershell edition for resource would allow to reuse existing dsc resource that may be not supported anymore or updated very rarely

Proposed technical implementation details

add new option to resource directives to specify powershell edition to use

- resource: Module/Resource
     directives:
       powershellEdition: core | desktop

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by locating the winget configure handling for resource directives and the DSC resource execution entry point. Done means the proposed powershellEdition directive accepts core or desktop and causes the selected edition to run the resource, with coverage for both values.

Written by the indexing model from the issue text.

Assessment

Tech stack
powershell
Domain
cli
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.