Skip to content

resolve variables in .env file based on previously set variables#262

Merged
glours merged 1 commit intocompose-spec:masterfrom
ndeloof:os_env
May 17, 2022
Merged

resolve variables in .env file based on previously set variables#262
glours merged 1 commit intocompose-spec:masterfrom
ndeloof:os_env

Conversation

@ndeloof
Copy link
Copy Markdown
Collaborator

@ndeloof ndeloof commented May 17, 2022

variable substitution in .env file MUST not assume values from os.Env, but use previously registered environment variables (set either by WithOsEnv or by direct assignment to projectOptions.Environment)

variables MUST NOT override a previously defined variable, so that one can use:

  • FOO=BAR set by os.env
  • QIX=${FOO} set by .env file
  • FOO=... set by .env file does not override value set by os.env

see docker/compose#9442

@ndeloof ndeloof requested review from glours and ulyssessouza May 17, 2022 13:55
Copy link
Copy Markdown
Collaborator

@glours glours left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LTGM

@glours glours merged commit c9f323e into compose-spec:master May 17, 2022
@ndeloof ndeloof deleted the os_env branch May 17, 2022 14:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants