microsoft / microsoft/winget-cli
File resource fails during configuration
Nobody has claimed this yet.
- Dominant language
- C++
- Stars
- 26.4k
- Forks
- 1.8k
- Avg merge
- 1d 11h
- Merged PRs (30d)
- 15
Description
Brief description of your issue
@meikTranel reported in https://github.com/microsoft/winget-cli/discussions/3346
# Setup Git
- resource: Microsoft.WinGet.DSC/WinGetPackage
id: git
directives:
description: Install GIT
allowPrerelease: true
settings:
id: git.git
source: winget
- resource: File
directives:
description: Use gitconfig from repo
dependsOn:
- git
settings:
SourcePath: ${WinGetConfigRoot}\.gitconfig
DestinationPath: $env:UserProfile\.gitconfig
Copying files using the File resource fails because apparently it needs windows management dlls which cannot be loaded in ps core also.
Steps to reproduce
Build a configuration with the above resources.
Expected behavior
File resource would be copied to the destination path.
Actual behavior
An error reporting "The resource 'File' implemented as 'Binary' is not supported by Invoke-DscResource.
Environment
Not reported.
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.
Research direction
Build a configuration using the listed WinGetPackage and File resources, then trace how the File resource is handled through Invoke-DscResource in PowerShell Core. Focus on why the Binary implementation cannot load or run in this configuration. Done means the .gitconfig is copied from SourcePath to DestinationPath without the reported unsupported-resource error.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- powershell
- Domain
- cli
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100