You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It seems impossible currently to receive output from a powershell script which outputs on stderr for example with Write-Error.
Firstly, if any output is on stderr then the promise is rejected unconditionally (invocationHadErrors).
Secondly, all output is captured into the same stream.
lib/Shell.js
This script seems to be combining stdout and stderr:
It would be more powerful if one could call a powershell script and not assume that a single error is the end of the script. PowerShell itself offers $ErrorActionPreference="continue" whereby a script can output errors and still continue running.
The text was updated successfully, but these errors were encountered:
@cawoodm Liked the idea very much!
I'm about to release a new version in the coming days, would you like to help me think of a way to implement this in the new code?
It seems impossible currently to receive output from a powershell script which outputs on
stderr
for example withWrite-Error
.Firstly, if any output is on
stderr
then the promise is rejected unconditionally (invocationHadErrors
).Secondly, all output is captured into the same stream.
lib/Shell.js
This script seems to be combining stdout and stderr:
It would be more powerful if one could call a powershell script and not assume that a single error is the end of the script. PowerShell itself offers
$ErrorActionPreference="continue"
whereby a script can output errors and still continue running.The text was updated successfully, but these errors were encountered: