Skip to content

Commit

Permalink
Make sure project_src is an absolute path. (#828)
Browse files Browse the repository at this point in the history
  • Loading branch information
felixfontein authored Apr 4, 2024
1 parent 9ff53bc commit 2925334
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 2 additions & 0 deletions changelogs/fragments/828-compose-project_src.yml
Original file line number Diff line number Diff line change
@@ -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)."
2 changes: 1 addition & 1 deletion plugins/module_utils/compose_v2.py
Original file line number Diff line number Diff line change
Expand Up @@ -507,7 +507,7 @@ def __init__(self, client, min_version=MINIMUM_COMPOSE_VERSION):
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']
Expand Down

0 comments on commit 2925334

Please sign in to comment.