Open denelon opened 8 months ago
winget configure validate
does this currently (using configuration from linked issue):
> winget configure validate E:\Temp\validate-config.yaml
Apply :: WinGetPackage [chrome]
The configuration unit is only available as a prerelease, but it is not marked that way in the configuration. Add `allowPrerelease: true` to the `directives`.
Which additional scenarios should inform the user?
winget configure file.yaml
winget configure show file.yaml
Get-WinGetConfiguration file.yaml
Get-WinGetConfiguration file.yaml | Invoke-WinGetConfiguration
Get-WinGetConfiguration file.yaml | Confirm-WinGetConfiguration
The code that does this specific check occurs outside of the core configuration component. If we wanted it to be universally available, I think the best solution would be to add new APIs to the core component and shift the current code into the processor. This would be a somewhat larger task that would really only help Confirm-WinGetConfiguration
directly. Even more would be required if we wanted to enable it to work generically from applying.
Improvements to the error messaging around "we couldn't find the resource" could be made more easily to just the winget
commands using the existing code and messaging.
I think it should be in each scenario. This is a "help the user" fall into the pit of success. It's going to be even more complex for enterprise customers with source and configuration restrictions to understand and help their users.
In order to scope this down to get an initial improvement out, feel free to create another "smaller" issue for the CLI side, and we can work on the larger scoped improvements in the future.
Description of the new feature / enhancement
When I have a configuration and it is attempting to use a DSC Resource in a prerelease PowerShell module, the configuration fails if I have "prerelease: false". When the configuration is being evaluated, it should help in the case where a prerelease module is available but a stable module is not.
Related to/Inspired by:
4021
Proposed technical implementation details
No response