I'm looking inside Jenkins job as part of the series of build commands:
PATH=c:\cygwin\bin\%PATH%;
I'm sure of what is happening to %PATH%
in this context and I have not observed a variable surrounded by %. What is it called and what does it do?
CodePudding user response:
%PATH%
is called a Placeholder, where the surrounding system, weather that is Windows, or Jenkins or any other system expects such "wrapped with % words" to be later REPLACED by some value, which can be used in scripting, within OS Environments (in your case Windows Environments)
In Windows the %PATH%
is usually something like:
%SystemRoot%\system32;%SystemRoot%;%SystemRoot%\System32\Wbem
which further expands to other paths, where the system expects specific applications or libraries/DLLs to be found.
Keep in mind that as you install programs, the path is updated with the paths for the newly installed programs. So, if you have erased your path after installing other programs, those programs may be affected.
CodePudding user response:
That is for variable expansion.
%PATH% will print the value of the PATH variable, so what your example does is prepends the new path to the existing PATH variable.