You've already forked setup-dotnet
mirror of
https://github.com/actions/setup-dotnet.git
synced 2025-09-04 20:04:07 +07:00
work on fixing test
This commit is contained in:
@ -30,7 +30,7 @@ export class DotNetVersionInfo {
|
||||
}
|
||||
|
||||
//Note: No support for previews when using generic
|
||||
let parts: string[] = version.split('.');
|
||||
const parts: string[] = version.split('.');
|
||||
|
||||
if (parts.length < 2 || parts.length > 3) this.throwInvalidVersionFormat();
|
||||
|
||||
@ -38,13 +38,8 @@ export class DotNetVersionInfo {
|
||||
this.throwInvalidVersionFormat();
|
||||
}
|
||||
|
||||
let major = this.getVersionNumberOrThrow(parts[0]);
|
||||
let minor;
|
||||
if (parts[1] === 'x') {
|
||||
minor = parts[1];
|
||||
} else {
|
||||
minor = this.getVersionNumberOrThrow(parts[1]);
|
||||
}
|
||||
const major = this.getVersionNumberOrThrow(parts[0]);
|
||||
const minor = ['x', '*'].includes(parts[1]) ? parts[1] : this.getVersionNumberOrThrow(parts[1]);
|
||||
|
||||
this.fullversion = major + '.' + minor;
|
||||
}
|
||||
|
Reference in New Issue
Block a user