mirror of
https://github.com/containers/podman-compose.git
synced 2025-01-23 14:28:46 +01:00
Update external volume name management
This commit is contained in:
parent
d983056982
commit
8ecb74916d
@ -189,9 +189,12 @@ def fix_mount_dict(compose, mount_dict, proj_name, srv_name):
|
||||
)
|
||||
elif not name:
|
||||
external = vol.get("external", None)
|
||||
ext_name = (
|
||||
external.get("name", f"{source}") if isinstance(external, dict) else None
|
||||
)
|
||||
if isinstance(external, dict):
|
||||
ext_name = external.get("name", None)
|
||||
elif external:
|
||||
ext_name = f"{source}"
|
||||
else:
|
||||
ext_name = None
|
||||
vol["name"] = ext_name if ext_name else f"{proj_name}_{source}"
|
||||
return mount_dict
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user