-
Notifications
You must be signed in to change notification settings - Fork 344
Provide Search for Local Installed Packages #276
Comments
its called cver. We had talked about consolidating cver and clist. usage cver all -lo will show all local installed packages. the exit codes are in a pending PR. examples: C:\Users> cver 7zip name : 7zip C:\Users> cver 7zip -lo name found 7zip 9.22.0 |
Thanks! Now I can verify if a package is already installed on the machine. C:\Chocolatey\bin\cver.bat 7zip -lo | findstr "no version" The %errorlevel% variable will be 0 if it can't find the package and this is what i am looking for my puppet recipe. Thanks again. |
Is there not already a chocolatey puppet module? I have it on my todo list to have a look at it, as I am just getting into puppet, but I had assumed that this would already be taken care of there. Gary |
there is a chocolatey module https://github.com/chocolatey/puppet-chocolatey but to get full exit codes natively we need the PR to be accepted, or you can build from my source. |
Wouldn't zero indicate no issue? Or in this case pkg exists locally? On Friday, April 19, 2013, Rich Siegel wrote:
Rob http://devlicio.us/blogs/rob_reynolds |
Ah, I see. I am still working with straight up package, file, and services in my puppet manifests just now, but I will be looking to extend into using Chocolatey as well. Look forward to giving it a try. |
Right. If it returns 0 then it will install the package. If not it will not do anything. https://github.com/chocolatey/puppet-chocolatey does not work properly when you set specific versions. |
The current release of chocolatey isn't complete for puppet as it requires the mods in my outstanding PRs... when you say does not work properly, what are you experiencing? I just want to confirm you aren't experiencing a different issue. |
When I add a specific version to install it still downloads the latest version rather than the one on the "ensure" attribute. |
that does sound like the exit code issue on the cver query. technically, what I think is happening in this case- it is not doing a ensure latest. The cver query is failing to determine a package is installed, so it is atempting to cinst package. Its part of the #210 |
This is in... |
Is it possible to run ...
*clist installed Package Name, Version *
If this package if found then it should return and exit code 0 and if not any other exit code.
The text was updated successfully, but these errors were encountered: