Hi,
Whenever I try to specify a custom command, I have to use the "/bin/bash -c <command>" approach, rather than including the commands and respective args below.
This is still the case regardless of whether or not I have added a suitable path as an environment variable for the pipeline or stage.
Additionally, this particular agent is running on OS X (although I haven't tested on any other platforms).
Any help would be greatly appreciated.
Ali
Comments
4 comments
Hi Ali,
More information (logs or screenshots) will probably help. But, this might help. These two ways of specifying custom command (shown below) should be exactly the same. Are you facing problems with something like this?
Also, we're moving from this forum to the Go users group on Google Groups. Please use that, if you have any further questions. There are more people on it.
Cheers,
Aravind
AND
Hi Aravind,
I'll move this thread over to the Google Group, but just wanted to reply here as well.
Just to clarify, the first approach works for me (as expected), but the second does not.
No matter what I do with the second approach, the command doesn't get executed and instead I get the error message saying something along the lines of "Please ensure that the command can be executed on the agent".
I thought it could be a Path issue, where Go wasn't able to find the binary that I'm calling, but I've added the correct path to the .bash_profile of the Go user and I've explicitly added the Path using environment variables for that pipeline, but neither seemed to help.
Thanks,
Ali
Hi Ali,
Altering PATH in .bash_profile doesn't help as the first version of the command is not being executed in a shell environment. Also, you need to ensure that the command you wish to run is available in the PATH. This could be verified by adding the following task to your pipeline:
This won't fix anything but would surely help you with debugging such issues.
Cheers,
Jyoti
Hi Jyoti,
I realized that the .bash_profile wasn't being used, which is why I'd explicitly set the Path in the environment variable for that stage.
I'll checkout your suggestion to see what's actually happening with the Path.
Thanks,
Ali
Please sign in to leave a comment.