From ab9802a42392ac8e8847c2340df19aa66b077ed5 Mon Sep 17 00:00:00 2001 From: "Thomas A. Christensen II" <25492070+MillironX@users.noreply.github.com> Date: Sat, 6 Jan 2024 10:08:13 -0600 Subject: [PATCH] fix: Add check for non-semver version strings in cache check --- src/functions.ts | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/functions.ts b/src/functions.ts index 6795f8c..09f3d83 100644 --- a/src/functions.ts +++ b/src/functions.ts @@ -86,6 +86,11 @@ export async function install_nextflow( } export function check_cache(version: string): boolean { + // A 'latest*' version indicates that a cached version would be invalid until + // the version is resolved: abort + if (version.includes("latest")) { + return false + } const cleaned_version = semver.clean(version, true) if (cleaned_version === null) { return false