mirror of
https://github.com/actions/setup-dotnet.git
synced 2024-11-26 05:13:05 +07:00
fix: allow null version
the only way this is valid is if rollForward is `latestMajor`, which is the only value that the global.json spec says doesn't require a version to be specified
This commit is contained in:
parent
bc45ec257e
commit
3089bb1ebd
@ -111,7 +111,7 @@ function getVersionFromGlobalJson(globalJsonPath: string): string {
|
||||
version = globalJson.sdk.version;
|
||||
const rollForward = globalJson.sdk.rollForward;
|
||||
if (rollForward && rollForward.startsWith('latest')) {
|
||||
const [major, minor, featurePatch] = version.split('.');
|
||||
const [major, minor, featurePatch] = (version || '').split('.');
|
||||
const feature = featurePatch.substring(0, 1);
|
||||
|
||||
switch (rollForward) {
|
||||
|
Loading…
Reference in New Issue
Block a user