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

Common environment not loaded if environment not specified #130

Open
izgeri opened this issue Feb 24, 2020 · 2 comments
Open

Common environment not loaded if environment not specified #130

izgeri opened this issue Feb 24, 2020 · 2 comments

Comments

@izgeri
Copy link
Contributor

izgeri commented Feb 24, 2020

I have a secrets.yml with a common environment and two custom envs:

common:
  ENV_VAR: !var my/value

dev:
  OTHER_ENV_VAR: !var my/dev/value

prod:
  OTHER_ENV_VAR: !var my/prod/value

I expected that when I ran summon my-script and did not specify an environment, that the common section would still be invoked - but it was not.

However when I run summon -e dev my-script or summon -e prod my-script, Summon invokes the common env and the env specified with the -e flag, and it does as expected.

@izgeri
Copy link
Contributor Author

izgeri commented Feb 24, 2020

Note: running summon my-script with v0.8.0 and a secrets.yml as above leads to an error like:

summon -p keyring.py python3 start.py
OOPS! {Kind:4 Style:0 Tag:!!map Value: Anchor: Alias:<nil> Content:[0xc00010c280 0xc00010c320 0xc00010c3c0 0xc00010c460] HeadComment: LineComment: FootComment: Line:2 Column:3}

@izgeri
Copy link
Contributor Author

izgeri commented Mar 24, 2021

Notes on additional related reported issues:

  • If the common section was not a section but just the text
    ENV_VAR: !var my/value
    
    Then running Summon fails whether or not you specify an environment
  • If another top-level section were added:
    ANOTHER_ENV_VAR: !var my/other-value
    
    Then running Summon fails whether or not you specify an environment

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

No branches or pull requests

1 participant