Skip to content
This repository has been archived by the owner on Feb 19, 2019. It is now read-only.

cpack/cpush returns zero exit code even when error occurs #256

Closed
activescott opened this issue Mar 19, 2013 · 9 comments
Closed

cpack/cpush returns zero exit code even when error occurs #256

activescott opened this issue Mar 19, 2013 · 9 comments

Comments

@activescott
Copy link

I'm automating cpack in a build script and it is returning a zero exit code despite the fact it writes an error "Could not find a part of the path..." - The nuspec path I fed it on the command line is just wrong. I can't catch it in the build script feasibly though without a good exit code.

@rismoney
Copy link
Contributor

iirc my PR will handle all the exit code failures - #210

I know @ferventcoder has been very busy as the PRs have been building up, so I guess patience or perhaps he responds to 🍪s lol.. , or if you are so bold, try my branch out and see if it addresses your issue... It is not guaranteed though to make it in choco so, you are on your own in that regard, but I will say that I run the changes in this branch in my production environment with 1000 servers w/o issue.

@ferventcoder
Copy link
Contributor

Most likely rismoney's stuff get's into choco proper.

@ferventcoder
Copy link
Contributor

And yes, things get very busy for me with my full time job. It ebbs and flows a bit, but the nature of the beast can consume most of my free time.

@nzbart
Copy link

nzbart commented Jan 15, 2014

I'm still seeing this bug in version 0.9.8.23. Has this been a regression?

C:\dev\ChocolateyPackages [master +0 ~3 -0]> cpack.bat .\vifm\vifm.nuspec
Calling 'C:\Chocolatey\chocolateyinstall\nuget.exe pack .\vifm\vifm.nuspec -NoPackageAnalysis'.
Attempting to build package from 'vifm.nuspec'.
The element 'metadata' in namespace 'http://schemas.microsoft.com/packaging/2010/07/nuspec.xsd' cannot contain text. List of possible elements expected: 'releaseNotes, frameworkAssemblies, tags, copyright, iconUrl, dependencies, references, language, requireLicenseAcceptance, licenseUrl' in namespace 'http://schemas.microsoft.com/packaging/2010/07/nuspec.xsd'.
Reading environment variables from registry. Please wait... Done.
C:\dev\ChocolateyPackages [master +0 ~3 -0]> $LASTEXITCODE
0

@ferventcoder
Copy link
Contributor

It's never returned exit codes... as we found in a different discussion (#384). I believe it was related to nuget always returning the incorrect exit code from way back 2 years ago.

@ferventcoder ferventcoder changed the title cpack returns zero exit code even when error occurs cpack/cpush returns zero exit code even when error occurs Jul 11, 2014
ferventcoder added a commit that referenced this issue Jul 11, 2014
 - This fixes the process to return the non-zero exit code when errors occur
ferventcoder added a commit that referenced this issue Jul 11, 2014
* avdv/wait-for-process:
  (GH-256) cpack/cpush always return 0 exit code even w/errors
  (maint) formatting
  (GH-516) Guard all Wait-Process if posh v3+
  Fix bogus error message with error code from 7za amiss
ferventcoder added a commit that referenced this issue Jul 11, 2014
* stable:
  (GH-256) cpack/cpush always return 0 exit code even w/errors
  (maint) formatting
  (GH-516) Guard all Wait-Process if posh v3+
  Fix bogus error message with error code from 7za amiss
  (GH-514) Fix setting errored during install
@jbuedel
Copy link

jbuedel commented Oct 16, 2015

This still happens in at least one situation. See below where I have passed an invalid $version$ token.
badversion

@ferventcoder
Copy link
Contributor

Let's file a new issue about this over at chocolatey/choco.

On Friday, October 16, 2015, Josh Buedel notifications@github.com wrote:

This still happens in at least one situation. See below where I have
passed an invalid $version$ token.
[image: badversion]
https://cloud.githubusercontent.com/assets/85681/10548068/fbe22a4e-73fd-11e5-8bc9-c2f1053fa16b.png


Reply to this email directly or view it on GitHub
#256 (comment)
.

Rob
"Be passionate in all you do"

http://devlicio.us/blogs/rob_reynolds
http://ferventcoder.com
http://twitter.com/ferventcoder

@jbuedel
Copy link

jbuedel commented Oct 16, 2015

New issue created. chocolatey/choco#469

@ferventcoder
Copy link
Contributor

Thanks!

On Friday, October 16, 2015, Josh Buedel notifications@github.com wrote:

New issue created. chocolatey/choco#469
chocolatey/choco#469


Reply to this email directly or view it on GitHub
#256 (comment)
.

Rob
"Be passionate in all you do"

http://devlicio.us/blogs/rob_reynolds
http://ferventcoder.com
http://twitter.com/ferventcoder

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

5 participants