chocolatey / cChoco

Community resource to manage Chocolatey
Apache License 2.0
154 stars 99 forks source link

Choco Run Errors out because of Null Source #100

Closed jrdnr closed 5 years ago

jrdnr commented 6 years ago

Fixes #96 Removed unnecessary [ValidateNotNullOrEmpty] requirements on $Source parameter Added check to only add source if set when calling Test-TargetResource

I did not edit the cChocoPackageInstallerSet\cChocoPackageInstallerSet.schema.psm1 to remove the source parameter from the MOF as its presence in the MOF does not cause any problems, and the composite resources do not appear to allow dynamically building the schema based on which parameters are defined, so each potentially Null variable combination would require an if/else and specifying the full schema which would get messy.

pauby commented 5 years ago

LTGM!

pauby commented 5 years ago

@jrdnr Thanks for your contriibution!