-
Notifications
You must be signed in to change notification settings - Fork 163
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
0.9.10 and exit codes #186
Comments
yay! I'll plan on a releasing a new boxstarter soon with updated chocolatey. this fix in particular will make debugging certain scenarios much easier! |
I suspect that I'm having issues with the return codes. All my packages that indicate a required reboot are marked as unsuccessful. But when I update the chocolatey.dll to version 0.9.10.3 I get errors when the ChocolateyWrapper is instantiated from the SimpleInjector that the container cannot be modified anymore. |
@riezebosch share the errors? |
|
Are you trying to change the container? |
Not that I'm aware of. The ChocolateyWrapper does so. |
I'm almost done updating the chocolatey assembly that is shipped with Boxstarter. This solves several incompatibilities of Boxstarter with the current version of chocolatey. One problem with the chocolatey API that I created a workaround for is the modifications of the SimpleInjector container. The container that is used by GetChocolatey is resolved from a static (lazy) field. This is problematic when GetChocolatey is called multiple times and the container get modified with new registrations. I solved this by storing the GetChocolatey result in a static field and do the registration only once. Another problem that I haven't fixed yet is a stackoverflow exception with the custom logger that gets injected by boxstarter. But by disabling the custom logger temporarily I was able to run a very complicated install script successfully. The exit coded and cancelled reboots from chocolatey where all handled just fine and I suspect the newer chocolatey switches and features to work also. Update The easy solution for me is not to output it to the $host but do a Console.WriteLine instead. But the other problem is that all log messages I receive from chocolatey are invoked on the Info method of the custom ILog. That doesn't seem right to me and I can't figure out from where these calls are initiated inside chocolatey. I would like to not worry about the console at all but providing a custom logger resets all original loggers nowadays. I cannot figure out how to add the original Log4NetLog again. |
I'd be curious to see the code where you are running into this. The loggers should only log, not write to a log file. Chocolatey will handle the writing to the console and to the chocolatey.log file on its own as long as the Log4NetLogger is still there.
That sounds a bit like a bug, but I think it's likely that it would be better to expose an option for the custom logger to be appended to the list instead of becoming the only logger.
This was actually meant to fix another issue. chocolatey/choco@eff02ea. |
Please, have a look: https://github.com/riezebosch/boxstarter/commit/44928cf2f0bcf25c7883e5cfb031e0f78f9fd84c I added tests to prove the working functionality. You'll have to install One thing I noticed is that AlphaFS is missing as a dependency on the chocolatey-lib in the nuspec. I've created a separate commit where I filter the VERBOSE messages from the logger. I don't know exactly where the messages are coming from, but is possible these are generated from the boxstarter scripts with all it overrides. |
PR #219 was merged. Boxstarter ships with a later version of chocolately.dll now. |
I mentioned this before in April - chocolatey/choco#512. 0.9.10 just released today. This includes the library. As you upgrade, be especially sure to pay attention to this scenario.
Here is the relevant portion of the ChangeLog (under breaking changes):
The text was updated successfully, but these errors were encountered: