Skip to content
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

[shimgen] no error written to standard error on error #142

Closed
ghost opened this issue Mar 3, 2015 · 13 comments
Closed

[shimgen] no error written to standard error on error #142

ghost opened this issue Mar 3, 2015 · 13 comments
Assignees
Milestone

Comments

@ghost
Copy link

ghost commented Mar 3, 2015

new with 0.9.9, when you launch a process to install a chocolatey package and an error occurs (my example is 'elasticsearch not installed. The package was not found with the source(s) listed.'), it no longer writes anything to standard error.

It used to do this properly before 0.9.8. Is it on purpose that in 0.9.9 you need to parse standard output in order to detect an error?

@ferventcoder
Copy link
Member

Interesting. I would think log4net would do that properly.

@ferventcoder
Copy link
Member

Can you expand on this a bit more?

@ferventcoder
Copy link
Member

So the exit code should be non-zero. That's a start. The other side of this is that it should be writing to stderr for things that are logged as errors.

@ghost
Copy link
Author

ghost commented Mar 3, 2015

In a C# application, I launch a new process that uses chocolatey to install a package and capture StandardOutput and StandardError.
If anything was written to StandardError, it would detect and log an error, blocking the program from continuing.
Previous to 0.9.9, this was working. Now with 0.9.9, this no longer works.

@ferventcoder
Copy link
Member

Dumb question, are you calling the shim?

@ghost
Copy link
Author

ghost commented Mar 3, 2015

hrm. I might be. I'm calling cinst.exe

@ferventcoder
Copy link
Member

This isn't new to choco 0.9.9 then :)

@ferventcoder ferventcoder changed the title no error written to standard error on error [shimgen] no error written to standard error on error Mar 3, 2015
@ferventcoder
Copy link
Member

What version of choco did you have in place before?

@ghost
Copy link
Author

ghost commented Mar 3, 2015

0.9.8.33.

@ferventcoder
Copy link
Member

the shims there would have been wrong as well though.

@ghost
Copy link
Author

ghost commented Mar 3, 2015

let me double check this. I hope I haven't been wasting your time....

On Tue, Mar 3, 2015 at 2:13 PM, Rob Reynolds notifications@github.com
wrote:

the shims there would have been wrong as well though.


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

@ferventcoder
Copy link
Member

I wonder if there was something else in the path then...

@ferventcoder
Copy link
Member

No it's good. The shims should properly output stderr to stderr.

@ferventcoder ferventcoder modified the milestones: 0.9.9.1, 0.9.9.2 Mar 3, 2015
@ferventcoder ferventcoder self-assigned this Mar 7, 2015
ferventcoder added a commit that referenced this issue Mar 7, 2015
Previously, any errors written by a shim were logged to stdout. Not
logging to stderr prevents applications that are watching for stderr
from being able to capture errors.

Capture and write errors to stderr. This is the same as
https://github.com/chocolatey/shimgen/issues/14
ferventcoder added a commit that referenced this issue Mar 7, 2015
* stable:
  (version) 0.9.9.2
  (doc) update changelog/nuspec
  (GH-142) shimgen - write errors to stderr
  (GH-150) Fix: InstallArguments is broken
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants