Skip to content

Commit

Permalink
Check dependencies.yml also (#276)
Browse files Browse the repository at this point in the history
  • Loading branch information
jtcohen6 authored Jul 6, 2023
1 parent 8a6fdee commit 94760a8
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions hubcap/package.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,12 @@ def parse_pkgs(repo_dir):
with open(repo_dir / Path("packages.yml"), "r") as stream:
pkgs = yaml.safe_load(stream)
return pkgs.get("packages", []) if pkgs else []
# new in v1.6
# a project can declare 'packages' in *either* packages.yml or dependencies.yml, not both
elif os.path.exists(repo_dir / "dependencies.yml"):
with open(repo_dir / Path("dependencies.yml"), "r") as stream:
pkgs = yaml.safe_load(stream)
return pkgs.get("packages", []) if pkgs else []
else:
return []

Expand Down

0 comments on commit 94760a8

Please sign in to comment.