mirror of
https://github.com/Azure/setup-helm.git
synced 2025-07-16 10:50:38 +00:00
append v to version incase it does not already include
This commit is contained in:
@ -118,6 +118,9 @@ function run() {
|
|||||||
if (version.toLocaleLowerCase() === 'latest') {
|
if (version.toLocaleLowerCase() === 'latest') {
|
||||||
version = yield getStableHelmVersion();
|
version = yield getStableHelmVersion();
|
||||||
}
|
}
|
||||||
|
else if (!version.toLocaleLowerCase().startsWith('v')) {
|
||||||
|
version = 'v' + version;
|
||||||
|
}
|
||||||
let cachedPath = yield downloadHelm(version);
|
let cachedPath = yield downloadHelm(version);
|
||||||
try {
|
try {
|
||||||
if (!process.env['PATH'].startsWith(path.dirname(cachedPath))) {
|
if (!process.env['PATH'].startsWith(path.dirname(cachedPath))) {
|
||||||
|
@ -110,6 +110,8 @@ async function run() {
|
|||||||
let version = core.getInput('version', { 'required': true });
|
let version = core.getInput('version', { 'required': true });
|
||||||
if (version.toLocaleLowerCase() === 'latest') {
|
if (version.toLocaleLowerCase() === 'latest') {
|
||||||
version = await getStableHelmVersion();
|
version = await getStableHelmVersion();
|
||||||
|
}else if(!version.toLocaleLowerCase().startsWith('v')){
|
||||||
|
version = 'v' + version;
|
||||||
}
|
}
|
||||||
|
|
||||||
let cachedPath = await downloadHelm(version);
|
let cachedPath = await downloadHelm(version);
|
||||||
|
Reference in New Issue
Block a user