Skip to content

Commit 896a1ec

Browse files
Throw error only when invalid version param is passed
1 parent 79fd3de commit 896a1ec

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

dist/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85552,7 +85552,7 @@ async function run() {
8555285552
try {
8555385553
const versionType = core.getInput("version");
8555485554
// validate the version input. Should be one of the VersionTypes.
85555-
if (isValidVersionType(versionType)) {
85555+
if (!isValidVersionType(versionType)) {
8555685556
core.setFailed(`Invalid version input: ${versionType}. Valid options are: ${Object.values(VersionType).join(", ")}. Defaulting to 'latest'.`);
8555785557
return;
8555885558
}

src/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ async function run(): Promise<void> {
7272
try {
7373
const versionType = core.getInput("version") as VersionType;
7474
// validate the version input. Should be one of the VersionTypes.
75-
if (isValidVersionType(versionType)) {
75+
if (!isValidVersionType(versionType)) {
7676
core.setFailed(
7777
`Invalid version input: ${versionType}. Valid options are: ${Object.values(VersionType).join(", ")}. Defaulting to 'latest'.`,
7878
);

0 commit comments

Comments
 (0)