Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Better Powershell Integration #149

Open
JamesMc86 opened this issue Jul 4, 2023 · 0 comments
Open

Better Powershell Integration #149

JamesMc86 opened this issue Jul 4, 2023 · 0 comments

Comments

@JamesMc86
Copy link
Owner

JamesMc86 commented Jul 4, 2023

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:

  • Native app has a way to throw in powershell - I haven't seen that.
  • Create a cmdlet that wraps G-CLI and checks the return code and/or error stream.

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/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant