G-CLI / G-CLI

A proxy mechanism allow LabVIEW programs to easily write out to the command line.
BSD 2-Clause "Simplified" License
71 stars 20 forks source link

Better Powershell Integration #149

Open JamesMc86 opened 1 year ago

JamesMc86 commented 1 year ago

Getting errors to powershell is a pain. It doesn't report an error based on return code and by default doesn't error if stderr contains data (I thought this would fix this).

This is one of the most common issues that comes up.

We aren't the only people with this issue. For example this guide from octopus deploy lays out the options: https://octopus.com/docs/deployments/custom-scripts/error-handling

This is a placeholder for if anyone can recommend a way to better integrate with powershell for this to work. I'm guessing there are two options:

I suspect the cmdlet is the better way to go. There is a tool called "Crescendo" which is designed to help with this: https://www.youtube.com/watch?v=c9m7ZdSwgkQ. Probably a better overview is https://devblogs.microsoft.com/powershell/native-commands-in-powershell-a-new-approach/