mirror of
https://github.com/actions/setup-dotnet.git
synced 2025-08-23 00:50:19 +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) {
|
outputDotnetVersion(version, installationPath) {
|
||||||
return __awaiter(this, void 0, void 0, function* () {
|
return __awaiter(this, void 0, void 0, function* () {
|
||||||
let versionsOnRunner = yield promises_1.readdir(path_1.default.join(installationPath.replace(/'/g, ''), 'sdk'));
|
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;
|
return installedVersion;
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
@ -266,7 +266,9 @@ export class DotnetCoreInstaller {
|
|||||||
path.join(installationPath.replace(/'/g, ''), 'sdk')
|
path.join(installationPath.replace(/'/g, ''), 'sdk')
|
||||||
);
|
);
|
||||||
|
|
||||||
let installedVersion = semver.maxSatisfying(versionsOnRunner, version)!;
|
let installedVersion = semver.maxSatisfying(versionsOnRunner, version, {
|
||||||
|
includePrerelease: true
|
||||||
|
})!;
|
||||||
|
|
||||||
return installedVersion;
|
return installedVersion;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user