Make sure project_src is an absolute path. (#828)

This commit is contained in:
Felix Fontein 2024-04-04 21:39:38 +02:00 committed by GitHub
parent 9ff53bc143
commit 2925334a1a
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 3 additions and 1 deletions

View File

@ -0,0 +1,2 @@
bugfixes:
- "docker_compose_v2* - allow ``project_src`` to be a relative path, by converting it to an absolute path before using it (https://github.com/ansible-collections/community.docker/issues/827, https://github.com/ansible-collections/community.docker/pull/828)."

View File

@ -507,7 +507,7 @@ class BaseComposeManager(DockerBaseClass):
self.check_mode = self.client.check_mode
parameters = self.client.module.params
self.project_src = parameters['project_src']
self.project_src = os.path.abspath(parameters['project_src'])
self.project_name = parameters['project_name']
self.files = parameters['files']
self.env_files = parameters['env_files']