From 6f03e72b6ef3593d023067cff1ee3496bc9f5059 Mon Sep 17 00:00:00 2001 From: riscy Date: Sun, 29 Sep 2024 17:28:41 -0700 Subject: [PATCH] fix check on key/attribute order on recipe to allow :url --- melpazoid/melpazoid.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/melpazoid/melpazoid.py b/melpazoid/melpazoid.py index 8a37c41..f60b1bc 100644 --- a/melpazoid/melpazoid.py +++ b/melpazoid/melpazoid.py @@ -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 ` 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)