forked from extern/podman-compose
allow project name to be fetched from dotenv
Look for project name in `self.environ` which includes both `os.environ` and dotenv variables so that the project name can also be defined in an environment file. Signed-off-by: Kuan-Yi Li <kyli@abysm.org>
This commit is contained in:
parent
252f1d57a5
commit
1cb608d8a7
@ -1541,7 +1541,7 @@ class PodmanCompose:
|
||||
if project_name is None:
|
||||
# More strict then actually needed for simplicity: podman requires [a-zA-Z0-9][a-zA-Z0-9_.-]*
|
||||
project_name = (
|
||||
os.environ.get("COMPOSE_PROJECT_NAME", None) or dir_basename.lower()
|
||||
self.environ.get("COMPOSE_PROJECT_NAME", None) or dir_basename.lower()
|
||||
)
|
||||
project_name = norm_re.sub("", project_name)
|
||||
if not project_name:
|
||||
|
Loading…
Reference in New Issue
Block a user