fix: Add check for non-semver version strings in cache check

This commit is contained in:
Thomas A. Christensen II 2024-01-06 10:08:13 -06:00
parent f65da33a7d
commit 99c654d38a

View file

@ -86,6 +86,11 @@ export async function install_nextflow(
} }
export function check_cache(version: string): boolean { 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) const cleaned_version = semver.clean(version, true)
if (cleaned_version === null) { if (cleaned_version === null) {
return false return false