-
Notifications
You must be signed in to change notification settings - Fork 161
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
Stop Boxstarter continuing on first package install failure #382
Comments
This is a breaking change. Boxstarter is intended to automate the installation / configuration of a machine. So you:
Your changes mean:
If this breaking change is implemented then the user should be given the choice to stop on errors - the default remaining as it is now and continuing through the errors. |
For what it's worth, I absolutely need some version of this change. I'm using boxstarter to automate configuration of build machines, and my recent discovery that it wasn't already working this way (when one of my chocolatey packages stopped installing correctly but I didn't realize because the errors were buried in the middle of a giant script log and everything had proceeded in spite of the errors) was a rude surprise. For the time being I'm going to take a fork of boxstarter with the changes in the PR, but it would be great if we could get some kind of option for continue or stop on failure in the official boxstarter releases. Thanks! |
Yes an optional switch would work fine in my environment. |
@simmdan I've finally had time to spend a little time on this, see GH-402 , anyway: I think that GH-401 may actually be a better fit for your use case once we've got some implementation for that issue. |
I like the idea of this ultimately reporting back to the user, after Boxstarter is finished, on how many packages were installed and how many were not (including errors if we have any). This is being discussed in #401 |
(GH-382) Add command line switch 'StopOnPackageFailure'
Per @pauby recommendation, I create this question to discuss PR #296. CC @gep13, @mwallner, @flcdrg and @mwrock
@mwallner suggests that my PR will break current BoxStarter behavior with the following case:
with the assumption that foo always fails to install. Currently, BoxStarter happily install something, skip foo, and continue to install bar. With my PR, BoxStarter will stops after the fail attempt to install foo.
Unless I miss something, I thought even with my PR, BoxStarter still continues to bar. cinst simply returns a 1 (indicating an error occurs) instead of a 0 (no error) (Boxstarter.Chocolatey/Chocolatey.ps1 line 59, and line 181-184). The installer script has the liberty to decide what happens when BoxStarter fails to install foo: report an error and stop, or log the failed package and continue.
Is my assumption correct?
The text was updated successfully, but these errors were encountered: