You've already forked setup-dotnet
mirror of
https://github.com/actions/setup-dotnet.git
synced 2025-07-01 04:33:17 +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:
@ -111,7 +111,7 @@ function getVersionFromGlobalJson(globalJsonPath: string): string {
|
|||||||
version = globalJson.sdk.version;
|
version = globalJson.sdk.version;
|
||||||
const rollForward = globalJson.sdk.rollForward;
|
const rollForward = globalJson.sdk.rollForward;
|
||||||
if (rollForward && rollForward.startsWith('latest')) {
|
if (rollForward && rollForward.startsWith('latest')) {
|
||||||
const [major, minor, featurePatch] = version.split('.');
|
const [major, minor, featurePatch] = (version || '').split('.');
|
||||||
const feature = featurePatch.substring(0, 1);
|
const feature = featurePatch.substring(0, 1);
|
||||||
|
|
||||||
switch (rollForward) {
|
switch (rollForward) {
|
||||||
|
Reference in New Issue
Block a user