I am having some trouble/confusion with the environment variable syntax for path-like environment variables for both Linux and Windows. I have been attempting trial-and-error, but without much luck.
For example in Linux, I want to set the path using something like “export PATH=/usr/local/bin;$PATH”. It should append the existing PATH to the end of my new path string.
Same in Windows, the syntax is “Set PATH = c:\mystuff;%PATH%”
What syntax should I use in TeamCity? I am having trouble getting things to work.
In addition, how do I handle paths with spaces in them? Do I need to surround everything with quotes? I tried this and it does not work, is it single or double quotes?
What if I want to specify a path that includes a TeamCity reference path such as %teamcity.build.workingDir%? What syntax do I use to include that path in an environment path variable? Does the inserted variable include the backslash at the end?
I could not find any good examples of this in the documentation, so some help would be appreciated.