forked from extern/podman-compose
#249: read COMPOSE_PROJECT_NAME env
This commit is contained in:
parent
af53b65068
commit
f66861f89a
@ -1076,7 +1076,8 @@ class PodmanCompose:
|
||||
|
||||
if not project_name:
|
||||
# More strict then actually needed for simplicity: podman requires [a-zA-Z0-9][a-zA-Z0-9_.-]*
|
||||
project_name = norm_re.sub('', dir_basename.lower())
|
||||
project_name = os.environ.get("COMPOSE_PROJECT_NAME", None) or dir_basename.lower()
|
||||
project_name = norm_re.sub('', project_name)
|
||||
if not project_name:
|
||||
raise RuntimeError("Project name [{}] normalized to empty".format(dir_basename))
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user