fix: parse the latest flag properly

This commit is contained in:
Aarnav Tale
2023-01-25 01:00:04 -05:00
parent 7446d29d60
commit c6e917eb5e

View File

@@ -21,7 +21,7 @@ export async function installKubectl() {
trimWhitespace: true
})
const version = input || await fetchLatestVersion()
const version = input === 'latest' ? await fetchLatestVersion() : input
if (!version?.startsWith('v')) {
setFailed('Unable to determine the `kubectl` version to install')