microsoft / winget-cli

WinGet is the Windows Package Manager. This project includes a CLI (Command Line Interface), PowerShell modules, and a COM (Component Object Model) API (Application Programming Interface).
https://learn.microsoft.com/windows/package-manager/
MIT License
23.37k stars 1.45k forks source link

Configuration does not ensure that required modules are present #4878

Open JohnMcPMS opened 1 month ago

JohnMcPMS commented 1 month ago

Brief description of your issue

The configuration processor ensures that the target module is present, but it does not ensure that any subsequent required modules are present. This can lead to a situation where the resource module is present, but the module cannot be loaded due to the missing dependencies.

Steps to reproduce

> Install-Module Microsoft.WinGet.DSC
> Uninstall-Module Microsoft.WinGet.Client
> [Apply any configuration using Microsoft.WinGet.DSC]

Expected behavior

Configuration installs any required modules to operate.

Actual behavior

An error like: The required module 'Microsoft.WinGet.Client' is not loaded. Load the module or remove the module from 'RequiredModules' in the file...

Environment

1.9 era