append v to version incase it does not already include

This commit is contained in:
Raghavendra S
2020-05-11 13:45:17 +05:30
parent 1a980ffbb5
commit 5801d81e70
2 changed files with 5 additions and 0 deletions

View File

@ -118,6 +118,9 @@ function run() {
if (version.toLocaleLowerCase() === 'latest') {
version = yield getStableHelmVersion();
}
else if (!version.toLocaleLowerCase().startsWith('v')) {
version = 'v' + version;
}
let cachedPath = yield downloadHelm(version);
try {
if (!process.env['PATH'].startsWith(path.dirname(cachedPath))) {

View File

@ -110,6 +110,8 @@ async function run() {
let version = core.getInput('version', { 'required': true });
if (version.toLocaleLowerCase() === 'latest') {
version = await getStableHelmVersion();
}else if(!version.toLocaleLowerCase().startsWith('v')){
version = 'v' + version;
}
let cachedPath = await downloadHelm(version);