From a43259a186822a6090063dd905cdfa192c2e9517 Mon Sep 17 00:00:00 2001 From: Alex Hedges Date: Sat, 24 Feb 2024 21:34:50 -0500 Subject: [PATCH] Fix overly broad check for existing miniforge build files The glob pattern we were using was too permissive and detecting miniconda build scripts as miniforge build scripts when they shared the same version. I have rewritten the pattern matching code to ensure we only look at files starting with `miniforge` and `mambaforge`. --- plugins/python-build/scripts/add_miniforge.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/python-build/scripts/add_miniforge.py b/plugins/python-build/scripts/add_miniforge.py index 1290b5cb..efa17a91 100755 --- a/plugins/python-build/scripts/add_miniforge.py +++ b/plugins/python-build/scripts/add_miniforge.py @@ -100,6 +100,6 @@ for release in requests.get(f'https://api.github.com/repos/{MINIFORGE_REPO}/rele logger.info('Looking for %(version)s in %(out_dir)s', locals()) - if not list(out_dir.glob(f'*-{version}')): + if any(not list(out_dir.glob(f'{distribution}*-{version}')) for distribution in DISTRIBUTIONS): logger.info('Downloading %(version)s', locals()) add_version(release)