mirror of
				https://github.com/astral-sh/setup-uv.git
				synced 2025-10-30 22:46:46 +00:00 
			
		
		
		
	Fallback if toml file parsing failed (#246)
This commit is contained in:
		
				
					committed by
					
						 GitHub
						GitHub
					
				
			
			
				
	
			
			
			
						parent
						
							b5f58b2abc
						
					
				
				
					commit
					14dc0be27c
				
			| @@ -9,7 +9,14 @@ export function getUvVersionFromConfigFile( | ||||
|     core.warning(`Could not find file: ${filePath}`); | ||||
|     return undefined; | ||||
|   } | ||||
|   let requiredVersion = getRequiredVersion(filePath); | ||||
|   let requiredVersion: string | undefined; | ||||
|   try { | ||||
|     requiredVersion = getRequiredVersion(filePath); | ||||
|   } catch (err) { | ||||
|     const message = (err as Error).message; | ||||
|     core.warning(`Error while parsing ${filePath}: ${message}`); | ||||
|     return undefined; | ||||
|   } | ||||
|  | ||||
|   if (requiredVersion?.startsWith("==")) { | ||||
|     requiredVersion = requiredVersion.slice(2); | ||||
|   | ||||
		Reference in New Issue
	
	Block a user