Go CD - how to set PATH on OS X?

1.2k Views Asked by At

I'm trying to get various bin directories on the PATH for the Go Agent on OS X and I'm not having any luck. Googling around finds references to /etc/default/go-agent, which doesn't exist by default on the Mac and I can't find any documentation for OS X indicating that the Go Agent.app would use it if I created it.

Ideally, I don't want to modify anything like this and I'd rather manage the PATH through the Go Server UI - I see that I can set environment variables, but I can't find any docs on actually appending to the PATH - default UNIX syntax of $PATH:/some/new/path/bin doesn't work.

Any advice?

1

There are 1 best solutions below

0
On

There are couple of ways to override PATH while starting the GoCD Agent app on OSX:

  • Overriding them during startup when starting from the terminal

    PATH=$PATH:/usr/local/bin open /Applications/Go\ Agent.app
    
  • Overriding them using a file ~/Library/Application Support/Go Agent/overrides.env. This file is sourced during agent startup, and it can be setup to change environment variables.

    PATH=$PATH:/usr/local/bin
    

Source: https://docs.go.cd/current/installation/install/agent/osx.html#overriding-default-startup-arguments-and-environment