Assuming latest supported

This commit is contained in:
Joseph Garrone 2024-12-14 14:44:30 +01:00
parent 9185740d35
commit b1b6919395
2 changed files with 7 additions and 3 deletions

View File

@ -48,7 +48,8 @@ export const { getSupportedKeycloakMajorVersions } = (() => {
return n;
})
.filter(exclude(undefined));
.filter(exclude(undefined))
.sort((a, b) => b - a);
return cache;
}

View File

@ -173,12 +173,15 @@ export async function command(params: {
process.exit(1);
} catch {
// NOTE: Latest version
const [n] = getSupportedKeycloakMajorVersions();
console.warn(
chalk.yellow(
`Could not determine the major Keycloak version number from the docker image tag ${dockerImageTag}. Assuming 26`
`Could not determine the major Keycloak version number from the docker image tag ${dockerImageTag}. Assuming ${n}`
)
);
return 26;
return n;
}
}