fix check on key/attribute order on recipe to allow :url

This commit is contained in:
riscy 2024-09-29 17:28:41 -07:00
parent 1c25f445e9
commit 6f03e72b6e

View file

@ -575,8 +575,8 @@ def _check_recipe(recipe: str, elisp_dir: Path) -> None:
_fail(f"- No .el file matches the name '{package_name(recipe)}'")
if ':url' in recipe and 'https://github.com' in recipe:
_fail('- Use `:fetcher github :repo <repo>` instead of `:url`')
if recipe.index(':fetcher') > recipe.index(':repo'):
_note('- Specify `:fetcher` before `:repo` in your recipe', CLR_WARN)
if recipe.index(':fetcher') > max(recipe.find(':repo'), recipe.find(':url')):
_note('- Specify `:fetcher` before `:repo` or `:url` in your recipe', CLR_WARN)
if ':files' in recipe:
try:
files_default_recipe = _files_in_recipe(_default_recipe(recipe), elisp_dir)