mirror of
https://github.com/actions/setup-dotnet.git
synced 2025-08-18 14:45:09 +00:00
Fix version satisfying logic
This commit is contained in:
parent
4d8de26495
commit
855515f5da
4
dist/index.js
vendored
4
dist/index.js
vendored
@ -366,7 +366,9 @@ class DotnetCoreInstaller {
|
||||
outputDotnetVersion(version, installationPath) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
let versionsOnRunner = yield promises_1.readdir(path_1.default.join(installationPath.replace(/'/g, ''), 'sdk'));
|
||||
let installedVersion = semver_1.default.maxSatisfying(versionsOnRunner, version);
|
||||
let installedVersion = semver_1.default.maxSatisfying(versionsOnRunner, version, {
|
||||
includePrerelease: true
|
||||
});
|
||||
return installedVersion;
|
||||
});
|
||||
}
|
||||
|
@ -266,7 +266,9 @@ export class DotnetCoreInstaller {
|
||||
path.join(installationPath.replace(/'/g, ''), 'sdk')
|
||||
);
|
||||
|
||||
let installedVersion = semver.maxSatisfying(versionsOnRunner, version)!;
|
||||
let installedVersion = semver.maxSatisfying(versionsOnRunner, version, {
|
||||
includePrerelease: true
|
||||
})!;
|
||||
|
||||
return installedVersion;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user