Crescendo
Crescendo copied to clipboard
Generated commands cannot handle output written to the error stream
Today I was attempting to write wrappers around some binaries used at my company. These binaries write to stderr when an error is encountered. Unfortunately, the generated functions use the call operator to invoke the native binaries and stderr output is not captured.
This means that if the native command encounters an error, I cannot write an OutputHandler to parse those errors or throw exceptions.
I'd like to suggest using a System.Diagnostics.Process object to execute the inner commands instead of using the call operator. This would enable a developer to read anything written to the error stream via ErrorHandlers (which could be written the same way as OutputHandlers) and more effectively throw exceptions.
@draproctor - Thank you for raising this issue -- We are investigating the best implementation to handle this - and I will provide our thinking here as the investigation progresses.
fixed with #170
Thank you! Fixed/closed - in release: https://www.powershellgallery.com/packages/Microsoft.PowerShell.Crescendo/1.1.0-RC1