Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

environment variables not honoured in config file arguments. (v2 only) #386

Closed
petersilva opened this issue Aug 17, 2021 · 2 comments
Closed
Labels
bug Something isn't working likely-fixed likely fix is in the repository, success not confirmed yet. v2only only affects v2 branches.

Comments

@petersilva
Copy link
Contributor

issue reported internally to GoC (not publically accessible): https://gccode.ssc-spc.gc.ca/ec-msc/msc-geomet/-/issues/269
by @tomkralidis

in a config file:

discard ${SET_DISCARD}

is always false, regardless of what value is set in the environment variable SET_DISCARD.

short version: !@$#!@ v2 parser...

This happens because the option parser, inexplicably literally parses ${SET_DISCARD} for truth value instead of what it resolves to ( the former being in words[1], and the equivalent with variable substitutions being applied being in words1
noticed

  • this affected pretty much all boolean and integer options.
  • only affects v2. v3 does the right thing, with 30% less code. oh well.
@petersilva petersilva added bug Something isn't working v2only only affects v2 branches. labels Aug 17, 2021
@petersilva petersilva added the likely-fixed likely fix is in the repository, success not confirmed yet. label Aug 17, 2021
@tomkralidis
Copy link
Contributor

Thanks @petersilva !

@petersilva
Copy link
Contributor Author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working likely-fixed likely fix is in the repository, success not confirmed yet. v2only only affects v2 branches.
Projects
None yet
Development

No branches or pull requests

2 participants