--
You received this message because you are subscribed to the Google Groups "go-cd" group.
To unsubscribe from this group and stop receiving emails from it, send an email to go-cd+un...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/go-cd/8e8ef90a-9f91-4b3a-b479-10a944bb1ccen%40googlegroups.com.
There is a comment with a possible workaround on the linked issue - https://github.com/gocd/gocd/issues/4173#issuecomment-596109199. Have you tried that?
We've a similar problem with linux based systems as well. As a general rule I always wrap all my commands inside a shell script (or in your case a PS file) and check it in as part of the repository like a bin/build.sh and run that from GoCD instead of manually specifying the command on GoCD. This has the following advantages like:
- I can move away from GoCD if I ever want to - think of it like an anti-Vendor lock-in mechanism.
- I can also build it locally or inside a docker or things like that If needed.
- I have fine grained control over who changed what and when on the commands for the build via my Git history. GoCD also does this, but it ain't easy to view the change history. You can track these changes too as part of your code review process itself.
- Since go-agents don't really spawn the command inside a shell that means referring to environment variables as part of the command would also be a pain. Having the command in a separate script allows me to access environment variables for my build like embedding the version as part of the build process into my final artifacts so I can track them via an internal API for example.