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 0025b1c79d
commit ab9802a423
Signed by: millironx
GPG key ID: 09335146883990B9

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