Skip to content

expansion modifiers block inherited values on merge #77

@rsgalloway

Description

@rsgalloway

if I have an app.env file like:

include: [default]
all: &all
 API_KEY: ${API_KEY}

and a secrets.env like:

include: [default]
all: &all
  API_KEY: !base64 c2VjcmV0

and a prod.env file like:

include: [default, secrets, app]

resolving API_KEY in prod works:

$ envstack prod -r API_KEY
API_KEY=secret

but not when writing it back out:

$ envstack prod -o out.env
$ ./out.env -r API_KEY
API_KEY=

this appears to be because the ${API_KEY} value in app.env overrides the value in secrets.env when merging. if I put secrets after app then it merges correctly, but since the value in app.env is an expansion modifier I would expect it to inherit the value from secrets just like when resolving.

Metadata

Metadata

Assignees

Labels

bugSomething isn't workingquestionFurther information is requested

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions