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

Fix COMPOSE_PROJECT_NAME variable parsing order regression #805

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Commits on Nov 21, 2023

  1. Fix COMPOSE_PROJECT_NAME parsing order

    In a previous change (9d5b255) the support to read `COMPOSE_PROJECT_NAME` from the `name` attribute in the `compose.yml` file was added. Since the attribute is only available after parsing the compose file, the resolution of the variable was done afterwards.
    
    The variable is therefore usable inside the container, HOWEVER it can no longer be used for substitution while loading the compose file. Values that depend on this variable are therefore empty at the point of parsing the compose file.
    
    `COMPOSE_PROJECT_NAME` is either loaded from the environment or set to `dir_basename` by default.
    
    This commit changes the order of parsing `COMPOSE_PROJECT_NAME ` variable.
    First the compose file is loaded into a dict, then the single `name` attribute is evaluated and replaced, then if it does not exist, the default value is used.
    
    Signed-off-by: NKay <n.klipp@nkay.info>
    nkay08 committed Nov 21, 2023
    Configuration menu
    Copy the full SHA
    f6b075a View commit details
    Browse the repository at this point in the history