feat: update version retrieval logic

Updated the version retrieval logic in the `get_slim`
function of `index.ts` to correctly assign the `VER`
variable based on the provided `inputVersion`.
This change ensures that the appropriate version tag
is assigned even when a specific input version is
provided, enhancing the reliability of version
handling.

Fix #3

Signed-off-by: Dwi Siswanto <me@dw1.io>
This commit is contained in:
Dwi Siswanto 2023-08-15 01:11:46 +07:00
parent 427097c507
commit dd97b7e007
No known key found for this signature in database
GPG Key ID: D192CC08161630BD
2 changed files with 2 additions and 2 deletions

2
dist/index.js vendored
View File

@ -48,7 +48,7 @@ function get_slim() {
VER = response[0].tag_name;
}
else {
VER = inputTag;
VER = inputVersion;
}
}
catch (_a) {

View File

@ -43,7 +43,7 @@ async function get_slim() {
if (inputVersion == "" || inputVersion == "latest") {
VER = response[0].tag_name;
} else {
VER = inputTag;
VER = inputVersion;
}
} catch {
throw new Error('ERROR! Could not retrieve the current Slim version number.');