brick
brick copied to clipboard
Environment variable error appear even if variable is not used for current step
To reproduce:
- add an
BRICK_env variable as part of a command in the build step - run the prepare step without the env variable (
brick prepare) - brick will crash saying that the variable isn't defined
Expected behaviour: Prepare step should run fine.
We currently expand variables once for the entire config. A bit of a tradeoff.
But we haven't really had an issue with it as we usually use default values:
commands:
- REACT_APP_COMMIT_SHA=${BRICK_COMMIT_SHA:-unknown} yarn build
We currently expand variables once for the entire config. A bit of a tradeoff.
But we haven't really had an issue with it as we usually use default values:
commands: - REACT_APP_COMMIT_SHA=${BRICK_COMMIT_SHA:-unknown} yarn build
good call, I'll do that!