Hi,
Trying to get started w/psake and I'm having problems calling programs that output to stderr. I first noticed problems when working in ISE. Did web search and discovered that PS shell and ISE has different behavoir. Workaround was to redirect stderr to stdout or $null.
The workaround seems to work as expected for PS functions but not psake tasks.
Following is error message:
OutToStdErr.exe : Output To StdErr
At C:\projects\AutomatedBuilds\PSake\stderr\funcs.ps1:11 char:33
+ $results = .\OutToStdErr.exe <<<< 2>&1
+ CategoryInfo : NotSpecified: (Output To StdErr:String) [], RemoteException
+ FullyQualifiedErrorId : NativeCommandError
Following is what I'm experiencing.
Functions
Shell ISE
Expected | Actual Expected | Actual
Normal Pass | Pass Fail | Fail
SaveOutputToVar Pass | Pass Fail | Fail
StderrToStdout Pass | Pass Pass | Pass
StderrToNull Pass | Pass Pass | Pass
PSake Tasks
Shell ISE
Expected | Actual Expected | Actual
Normal Pass | Pass Fail | Fail
SaveOutputToVar Pass | Pass Fail | Fail
StderrToStdout Pass | Fail Pass | Fail
StderrToNull Pass | Fail Pass | Fail
The above table shows that the shell fails when output is redirected and nothing seems to work when in the ISE.
Hope the above makes sense.
Thanx for any help
Ps - test scripts attached.
John A.