Open JamesMc86 opened 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/
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/