You've already forked setup-dotnet
							
							
				mirror of
				https://github.com/actions/setup-dotnet.git
				synced 2025-11-04 08:56:35 +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