summon icon indicating copy to clipboard operation
summon copied to clipboard

Common environment not loaded if environment not specified

Open izgeri opened this issue 4 years ago • 2 comments

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 avatar Feb 24 '20 21:02 izgeri

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 avatar Feb 24 '20 21:02 izgeri

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

izgeri avatar Mar 24 '21 19:03 izgeri