Update solution

This commit is contained in:
IvanZosimov 2023-04-10 16:58:35 +02:00
parent 660c25a321
commit f199d27aa1
2 changed files with 1 additions and 6 deletions

3
dist/index.js vendored
View File

@ -258,9 +258,6 @@ class DotnetVersionResolver {
this.resolvedArgument.type = 'version'; this.resolvedArgument.type = 'version';
this.resolvedArgument.value = this.inputVersion; this.resolvedArgument.value = this.inputVersion;
} }
else if (!this.inputVersion) {
this.resolvedArgument.type = null;
}
else { else {
this.resolvedArgument.type = 'channel'; this.resolvedArgument.type = 'channel';
const [major, minor] = this.inputVersion.split('.'); const [major, minor] = this.inputVersion.split('.');

View File

@ -12,7 +12,7 @@ import {IS_LINUX, IS_WINDOWS} from './utils';
import {QualityOptions} from './setup-dotnet'; import {QualityOptions} from './setup-dotnet';
export interface DotnetVersion { export interface DotnetVersion {
type: string | null; type: string;
value: string; value: string;
qualityFlag: boolean; qualityFlag: boolean;
} }
@ -36,8 +36,6 @@ export class DotnetVersionResolver {
if (semver.valid(this.inputVersion)) { if (semver.valid(this.inputVersion)) {
this.resolvedArgument.type = 'version'; this.resolvedArgument.type = 'version';
this.resolvedArgument.value = this.inputVersion; this.resolvedArgument.value = this.inputVersion;
} else if (!this.inputVersion) {
this.resolvedArgument.type = null;
} else { } else {
this.resolvedArgument.type = 'channel'; this.resolvedArgument.type = 'channel';
const [major, minor] = this.inputVersion.split('.'); const [major, minor] = this.inputVersion.split('.');