Details
-
Bug
-
Resolution: Fixed
-
Low
-
1.2.4
-
None
Description
The "System Environment Variables" takes a space-separated list of environment variables. This is insufficient, as variables like CPPFLAGS and LDFLAGS often need to be set to values that themselves contain spaces.
Bamboo attempts to support this with some special-casing of quoted strings, but the quoted-string logic is broken. It avoids splitting on spaces between quotes - any quotes at all, not matching ones. So if I configure this value:
CPPFLAGS='-I/foo -I/bar' LDFLAGS="-L/baz -L/quux"
then what actually ends up in my build environment is the very malformed:
CPPFLAGS=-I/home/bamboo/opt/v4l/include -I/home/bamboo/opt/alsa-lib-1.0.15/include -I/home/bamboo/opt/libevent-1.3e/include' LDFLAGS="-L/home/bamboo/opt/alsa-lib-1.0.15/lib -L/home/bamboo/opt/libevent-1.3e/lib
i.e. the variable CPPFLAGS actually contains the string LDFLAGS= in its value.
Related to this issue is the problem that once you are configuring several environment variables, the single-line edit box quickly becomes unwieldy.
Both these problems could be fixed by making the environment variables configuration a multi-line textarea, and splitting on newlines.
Attachments
Issue Links
- is duplicated by
-
BAM-2792 Bamboo gets confused when passing in quoted system environment variables
- Closed
-
BAM-3103 System Environment Variable Parsing Error
- Closed
- is related to
-
BAM-2792 Bamboo gets confused when passing in quoted system environment variables
- Closed
- relates to
-
BAM-2792 Bamboo gets confused when passing in quoted system environment variables
- Closed