Describe the bug
The Get-TargetResource function for the cChocoPackageInstall resource enforces a non-null/empty Source parameter, but the cChocoPackageInstallerSet composite resource unconditionally sets the Source parameter. If the Source parameter isn't provided in configurations which use this composite resource, calls to Get-DscConfiguration after applying it will fail as they'll implicitly call Get-TargetResource with a null/empty Source parameter.
To Reproduce
Apply a configuration with a cChocoPackageInstallerSet resource and do not specify the Source parameter.
Invoke Get-DscConfiguration and observe the exception:
Get-DscConfiguration : PowerShell DSC resource cChocoPackageInstall failed to execute Get-TargetResource
functionality with error message: Cannot validate argument on parameter 'Source'. The argument is null or empty.
Provide an argument that is not null or empty, and then try the command again.
At line:1 char:1
+ Get-DscConfiguration
+ ~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidOperation: (MSFT_DSCLocalConfigurationManager:root/Microsoft/...gurationManager)
[Get-DscConfiguration], CimException
+ FullyQualifiedErrorId : ProviderOperationExecutionFailure,Get-DscConfiguration
Expected behaviorGet-DscConfiguration should successfully return after applying the configuration.
Screenshots
N/A
Software (please complete the following information):
Describe the bug The
Get-TargetResource
function for thecChocoPackageInstall
resource enforces a non-null/emptySource
parameter, but thecChocoPackageInstallerSet
composite resource unconditionally sets theSource
parameter. If theSource
parameter isn't provided in configurations which use this composite resource, calls toGet-DscConfiguration
after applying it will fail as they'll implicitly callGet-TargetResource
with a null/emptySource
parameter.To Reproduce
cChocoPackageInstallerSet
resource and do not specify theSource
parameter.Get-DscConfiguration
and observe the exception:Expected behavior
Get-DscConfiguration
should successfully return after applying the configuration.Screenshots N/A
Software (please complete the following information):
Additional context N/A