-
Notifications
You must be signed in to change notification settings - Fork 908
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
list/search/info - searching with --exact or info results in Object reference not set to an instance of an object #1837
Comments
This also happens for
|
find_package will either return the package that was found, or null. The case for null being returned needs to be handled, so that upstream callers are not affected.
(GH-1837) Handle potential for null package
* stable: (GH-1837) Handle potential for null package (maint) Correct whitespace (version) 0.10.15-beta
Thanks for the quick response on this issue. (The regression caused me a bit of drama this morning and @jborean93 was of great help in getting this addresses quickly) How can a pre-release build of chocolatey be tested easily? I downloaded the build artifact for 0f86f78 from AppVeyor and installed the nupkg with choco intall, but I'm not sure if that's the right way to do it? choco.exe is now barking about a non-official build, which makes sense I guess. Will there be a pre-release added to the nupkg feed for easier testing? |
@cwegener I have actually just released a beta version of chocolatey which you can grab from here: https://chocolatey.org/packages/chocolatey/0.10.15-beta-20190531 It is still working it's way through the moderation process, but you can grab it directly. |
Chocolatey v0.10.15 is being pushed out in the next hour. |
Thanks for catching this. I've added an additional scenario to the specs to find this to prevent any future regressions. |
Added tests to ensure that no results does not result in an error when searching with info or by exact name of package.
The specs produce a Scenarios file, ensure that is updated with the latest results.
Thank you guys for fix 'Object reference not set to an instance of an object'! |
What You Are Seeing?
Using
choco.exe list --exact <missing package name>
results in an error with an rc of 1This affects the
win_chocolatey
module in Ansible as we runchoco list --exact --local-only <package name>
to test whether a package is installed or not. Unfortunately I cannot see a way around this and so we will start being inundated with GitHub bugs until a new Chocolatey release with this fix is in.What is Expected?
How Did You Get This To Happen? (Steps to Reproduce)
Make sure you are on 0.10.14 and run the command above.
Output Log
Full Log Output
The text was updated successfully, but these errors were encountered: