Skip to content

Commit

Permalink
Also look for git root if available.
Browse files Browse the repository at this point in the history
  • Loading branch information
Qalthos committed Dec 12, 2024
1 parent ccf092b commit c2f1871
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/molecule/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -242,6 +242,11 @@ def collection_directory(self) -> Path | None:
current_dir = Path(self.project_directory)
if (current_dir / "galaxy.yml").exists():
return current_dir
show_toplevel = util.run_command("git rev-parse --show-toplevel")
if show_toplevel.returncode == 0:
git_root = Path(show_toplevel.stdout.strip())
if (git_root / "galaxy.yml").exists():
return git_root

Check warning on line 249 in src/molecule/config.py

View check run for this annotation

Codecov / codecov/patch

src/molecule/config.py#L249

Added line #L249 was not covered by tests
return None

@property
Expand Down

0 comments on commit c2f1871

Please sign in to comment.