travis-build icon indicating copy to clipboard operation
travis-build copied to clipboard

[DO NOT MERGE] Delay setting user-defined env vars after built-ins

Open BanzaiMan opened this issue 7 years ago • 3 comments

So that the user-defined environment variables can make use of default ones, such as TRAVIS_RUBY_VERSION.

Resolves https://github.com/travis-ci/travis-ci/issues/8858

BanzaiMan avatar Dec 06 '17 15:12 BanzaiMan

https://github.com/travis-ci/travis-ci/issues/8858#issuecomment-349685368

Hmmm. On a second thought, setting built-in env vars first will allow them to be overridden by users, and that does not seem like a good idea.

BanzaiMan avatar Dec 06 '17 16:12 BanzaiMan

bash allows read-only variables declare -rx FOO=bar instead of export FOO=bar subsequent attempt to set/unset FOO will cause an error

lightmare avatar Aug 26 '18 06:08 lightmare

@lightmare oh, that is pretty cool.

@BanzaiMan thoughts?

joshk avatar Sep 06 '18 21:09 joshk