cChoco | Community resource to manage Chocolatey | Command Line Interface library
kandi X-RAY | cChoco Summary
kandi X-RAY | cChoco Summary
This resource is aimed at getting and installing packages using Chocolatey. The resource takes the name of the package and will then install that package. See ExampleConfig.ps1 for example usage. See list of packages here:
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of cChoco
cChoco Key Features
cChoco Examples and Code Snippets
Community Discussions
Trending Discussions on cChoco
QUESTION
I am working on a DSC resource (cChoco) that currently depends on an outside utility (choco list
) to gather the information needed to Test-TargetResource. My problem is that the utility I have to call is very slow, and because cChoco installs many programs it currently has to pull the full list of installed software for each instance in the DSC MOF file.
The only way I have been able to come up with to work around this issue, is to pull the list of installed applications and write it to disk, and then just read it back from the file for subsequent runs, however this feels like a bit of a kluge to me. Are there any generally accepted design patterns for passing state between DSC resources or instances of the same resource other than just writing to a file? It seems like the limitations imposed on PowerShell by the DSC/Mof implementation requires a functional approach to designing resources so maybe if there are no generally accepted "right" ways to accomplish this in DSC, there would be something I could borrow from a more functional programing language?
If more background would be helpful check out https://github.com/chocolatey/cChoco/issues/90.
...ANSWER
Answered 2017-Aug-28 at 16:46Data sharing between resources (and instances of the same resource) is not possible in DSC. This is an open ask: https://windowsserver.uservoice.com/forums/301869-powershell/suggestions/13399734-returning-information-from-dsc-resource-to-another
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install cChoco
Test the resources using 'xDSCResourceDesigner'
Verify best practises using 'PSScriptAnalyzer'
Update the version in the manifest file
Publish the module to the PowerShell gallery
Check in updated manifest file to GitHub
Update ModuleVersion in cChoco.psd1 - use major.minor.patch.0;
Update version in appveyor.yml - use major.minor.patch.{build};
Merge development branch to master - git checkout master, git merge development, git push origin;
Tag master with new version - git tag v<major.minor.patch>;
Push changes with tag git push origin v<major.minor.patch>
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page