From 5c4b7c696adb6b28c93e13dd6fea6b635e1c327d Mon Sep 17 00:00:00 2001 From: Shivam Gupta Date: Wed, 17 Mar 2021 14:01:14 +0530 Subject: [PATCH] Adding warning when a stable release is not found --- src/run.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/run.ts b/src/run.ts index f5eaf9b..6a63943 100644 --- a/src/run.ts +++ b/src/run.ts @@ -105,11 +105,12 @@ async function getLatestHelmVersionFor(type) { } catch (err) { core.warning(util.format("Error while fetching the latest Helm %s release. Error: %s. Using defaul Helm version %s.", type, err.toString(), stableHelmVersion)); } + core.warning(util.format("Could not find stable release for Helm %s. Using defaul Helm version %s.", type, stableHelmVersion)); return stableHelmVersion; } // isValidVersion checks if verison matches the specified type and is a stable release -function isValidVersion(version, type) { +function isValidVersion(version, type): boolean { if (!version.startsWith(type)) return false; return version.indexOf('rc') == -1 @@ -137,7 +138,7 @@ async function run() { version = 'v' + version; } - core.debug(util.format("Downloading %s",version)); + core.debug(util.format("Downloading %s", version)); let cachedPath = await downloadHelm(version); try {