From 7e301b6ce8b4de27fedeb06ba7efa9ac4ea3c3ae Mon Sep 17 00:00:00 2001 From: Gavin Zhang Date: Mon, 30 Oct 2023 10:28:46 -0700 Subject: [PATCH 1/2] Update message when failed to fetch latest version --- lib/setup.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/setup.js b/lib/setup.js index 8b7dcd9..1fb839e 100644 --- a/lib/setup.js +++ b/lib/setup.js @@ -170,7 +170,7 @@ async function installUsingNativeInstaller(inputVersion) { const latestVersion = await getLatestReleaseTag("aws/aws-sam-cli"); // Must be full semantic version; downloads version directly from GitHub if (latestVersion && !isSemver(latestVersion)) { - core.setFailed("Latest version found must be in the format x.y.z"); + core.info("Fetched version is not in the format x.y.z. Use latest version without caching."); return ""; } version = latestVersion; From f2f8427116503e48206ec6ba69f5c0a413f2a2f5 Mon Sep 17 00:00:00 2001 From: Gavin Zhang Date: Mon, 30 Oct 2023 10:30:38 -0700 Subject: [PATCH 2/2] Format file --- dist/index.js | 4 +++- lib/setup.js | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/dist/index.js b/dist/index.js index 393a800..a1145ec 100644 --- a/dist/index.js +++ b/dist/index.js @@ -176,7 +176,9 @@ async function installUsingNativeInstaller(inputVersion) { const latestVersion = await getLatestReleaseTag("aws/aws-sam-cli"); // Must be full semantic version; downloads version directly from GitHub if (latestVersion && !isSemver(latestVersion)) { - core.setFailed("Latest version found must be in the format x.y.z"); + core.info( + "Fetched version is not in the format x.y.z. Use latest version without caching." + ); return ""; } version = latestVersion; diff --git a/lib/setup.js b/lib/setup.js index 1fb839e..2e6ce1c 100644 --- a/lib/setup.js +++ b/lib/setup.js @@ -170,7 +170,9 @@ async function installUsingNativeInstaller(inputVersion) { const latestVersion = await getLatestReleaseTag("aws/aws-sam-cli"); // Must be full semantic version; downloads version directly from GitHub if (latestVersion && !isSemver(latestVersion)) { - core.info("Fetched version is not in the format x.y.z. Use latest version without caching."); + core.info( + "Fetched version is not in the format x.y.z. Use latest version without caching." + ); return ""; } version = latestVersion;