mirror of
				https://git.mirrors.martin98.com/https://github.com/actions/setup-python
				synced 2025-10-31 21:11:06 +08:00 
			
		
		
		
	Rebuild action with new changes
This commit is contained in:
		
							parent
							
								
									84087f5301
								
							
						
					
					
						commit
						a6b01c4e40
					
				
							
								
								
									
										24
									
								
								dist/setup/index.js
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										24
									
								
								dist/setup/index.js
									
									
									
									
										vendored
									
									
								
							| @ -65270,19 +65270,19 @@ function resolveVersionInput() { | ||||
|     } | ||||
|     if (versionFile) { | ||||
|         const defaultVersionFile = '.python-version'; | ||||
|         const VersionFileExists = fs_1.default.existsSync(versionFile); | ||||
|         const defaultVersionFileExists = fs_1.default.existsSync(defaultVersionFile); | ||||
|         if (!VersionFileExists && !defaultVersionFileExists) { | ||||
|             throw new Error(`The specified python version file at: ${versionFile} does not exist and default ${defaultVersionFile} file isn't found`); | ||||
|         } | ||||
|         if (VersionFileExists) { | ||||
|             version = fs_1.default.readFileSync(versionFile, 'utf8'); | ||||
|             core.info(`Resolved ${versionFile} as ${version}`); | ||||
|         } | ||||
|         else { | ||||
|             version = fs_1.default.readFileSync(defaultVersionFile, 'utf8'); | ||||
|             core.info(`Resolved ${defaultVersionFile} as ${version}`); | ||||
|         if (!fs_1.default.existsSync(versionFile)) { | ||||
|             if (versionFile === defaultVersionFile) { | ||||
|                 throw new Error(`The specified python version file at: ${versionFile} does not exist.`); | ||||
|             } | ||||
|             if (fs_1.default.existsSync(defaultVersionFile)) { | ||||
|                 versionFile = defaultVersionFile; | ||||
|             } | ||||
|             else { | ||||
|                 throw new Error(`The specified python version file at: ${versionFile} does not exist and default ${defaultVersionFile} file isn't found`); | ||||
|             } | ||||
|         } | ||||
|         version = fs_1.default.readFileSync(versionFile, 'utf8'); | ||||
|         core.info(`Resolved ${versionFile} as ${version}`); | ||||
|         return version; | ||||
|     } | ||||
|     core.warning("Neither 'python-version' nor 'python-version-file' inputs were supplied. "); | ||||
|  | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user
	 IvanZosimov
						IvanZosimov