chocolatey / cChoco

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

cChocoSource, cChocoFeature and others #99

Open ferventcoder opened 6 years ago

ferventcoder commented 6 years ago

These would need to run choco -v one time to ensure that a config file exists. Otherwise when they hit a line like

https://github.com/chocolatey/cChoco/blob/6b8f5a5b56709c58c4b40b0290ff6e75e9c02898/DSCResources/cChocoSource/cChocoSource.psm1#L152

And it doesn't return any files, so when they call the next line https://github.com/chocolatey/cChoco/blob/6b8f5a5b56709c58c4b40b0290ff6e75e9c02898/DSCResources/cChocoSource/cChocoSource.psm1#L154

It errors on converting NULL into XML.

Workarounds

Run choco one time prior to setting configuration, perhaps just after the install in your installation script.