Skip to content
This repository has been archived by the owner on Feb 1, 2023. It is now read-only.

Environment variable error appear even if variable is not used for current step #79

Open
corradio opened this issue Jan 6, 2021 · 2 comments
Labels
bug Something isn't working

Comments

@corradio
Copy link
Member

corradio commented Jan 6, 2021

To reproduce:

  1. add an BRICK_ env variable as part of a command in the build step
  2. run the prepare step without the env variable (brick prepare)
  3. brick will crash saying that the variable isn't defined

Expected behaviour:
Prepare step should run fine.

@corradio corradio added the bug Something isn't working label Jan 6, 2021
@corradio corradio changed the title Environment variable warning appear even if variable is not used for current step Environment variable error appear even if variable is not used for current step Jan 6, 2021
@skovhus
Copy link
Contributor

skovhus commented Jan 6, 2021

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

@corradio
Copy link
Member Author

corradio commented Jan 6, 2021

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!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants