-
Notifications
You must be signed in to change notification settings - Fork 342
Conversation
It is worthy to note, that the Invoke-ChocolateyFunction will give free bubble up throws in any function. Basically using a splatting array we can use it to wrap any function and not worry about try/catching it. I actually wrapped all the chocolatey.ps1 callouts, and then we can throw at will. |
didn't realize i needed a rebase. should be good to merge now. |
wow this a royal pita to resolve conflicts! Will retest tomorrow, and we gotta get this in. |
It usually gets worse on resolving conflicts if the history line is messed On Friday, April 19, 2013, Rich Siegel wrote:
Rob http://devlicio.us/blogs/rob_reynolds |
the history line was fine. it just gets confusing as to what to keep and what to shed, especially if you havent look at a branch in months, and the conflicts occur on the same lines or moved around. |
Depends on your diff/merge tool as well. On Friday, April 19, 2013, Rich Siegel wrote:
Rob http://devlicio.us/blogs/rob_reynolds |
what are you using? |
Beyond compare 3 pro. Highly recommended and well worth $50. I use it On Friday, April 19, 2013, Rich Siegel wrote:
Rob http://devlicio.us/blogs/rob_reynolds |
@@ -72,24 +72,24 @@ if(Test-Path($extensionsPath)) { | |||
|
|||
#main entry point | |||
#Remove-LastInstallLog | |||
<<<<<<< HEAD |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A little scared about this...looks like a bad merge
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let me investigate tomorrow and recertify. Good catch.
Other than that, I'm digging this PR. |
all the bin files and chocolatey.cmd itself will exit with a proper 0 or 1 exit code if an error is thrown during runtime
this function provides the ability to "bubble up" errors encountered during chocolatey runs all the way back up to powershell or cmd this was implemented in the command line switches evaluatation so any chocolatey function where an error is thrown, an error message and status code of 0 or 1 will be returned
provide the try/catch/throw bubble up functionality to the chocolatey install process around nuget
if a single package version is queried at the cli in cmd or posh then a 0 error status code is returned if the package is present on the system or a 1 status code if 'not found'
alright - I believe this to be clean now - I based it off current HEAD, so you can plot it right on top :) |
Yes, one thing we'll stop doing is accepting pull requests without automated tests. Probably soon. |
I o not feel it is out of line to require submitters of pull requests to write tests. I know that is not necessarily as ubiquitous in powershell as it is in C# but this is one of the larger bits of powershell out there and it just wont be manageable or fun in any way to write tests on our own. It also helps to raise the bar of the community IMO. :) |
Agreed with all Matt said here. :) |
For what it is worth, I agree with Matt as well. Contributing to this project was the first time I had ever used Pester, and I can honestly say that it was very simple to get up to speed with, and there are plenty of existing tests in the code base to use as a basis for new tests, so there really is no good reason , IMO, to not include additional unit tests. Gary |
This is in - a8ea10d |
Chocolatey needs to exit with an error code of 1 if there is a problem encountered during a chocolatey run. This should bubble up from posh or cmd calls, within posh or cmd.