Parsing of "System Environment Variables" field is broken

XMLWordPrintable

      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.

            Assignee:
            Krystian Brazulewicz
            Reporter:
            Max Bowsher
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved:

                Estimated:
                Original Estimate - Not Specified
                Not Specified
                Remaining:
                Remaining Estimate - 0h
                0h
                Logged:
                Time Spent - 4h
                4h