From f199d27aa16f8e90965db2b0d490f64f00b05178 Mon Sep 17 00:00:00 2001 From: IvanZosimov Date: Mon, 10 Apr 2023 16:58:35 +0200 Subject: [PATCH] Update solution --- dist/index.js | 3 --- src/installer.ts | 4 +--- 2 files changed, 1 insertion(+), 6 deletions(-) diff --git a/dist/index.js b/dist/index.js index 92fa846..423a712 100644 --- a/dist/index.js +++ b/dist/index.js @@ -258,9 +258,6 @@ class DotnetVersionResolver { this.resolvedArgument.type = 'version'; this.resolvedArgument.value = this.inputVersion; } - else if (!this.inputVersion) { - this.resolvedArgument.type = null; - } else { this.resolvedArgument.type = 'channel'; const [major, minor] = this.inputVersion.split('.'); diff --git a/src/installer.ts b/src/installer.ts index 3764766..62b85d4 100644 --- a/src/installer.ts +++ b/src/installer.ts @@ -12,7 +12,7 @@ import {IS_LINUX, IS_WINDOWS} from './utils'; import {QualityOptions} from './setup-dotnet'; export interface DotnetVersion { - type: string | null; + type: string; value: string; qualityFlag: boolean; } @@ -36,8 +36,6 @@ export class DotnetVersionResolver { if (semver.valid(this.inputVersion)) { this.resolvedArgument.type = 'version'; this.resolvedArgument.value = this.inputVersion; - } else if (!this.inputVersion) { - this.resolvedArgument.type = null; } else { this.resolvedArgument.type = 'channel'; const [major, minor] = this.inputVersion.split('.');