mirror of
				https://git.mirrors.martin98.com/https://github.com/actions/setup-python
				synced 2025-10-31 13:41:06 +08:00 
			
		
		
		
	Remove duplicate code introduced in #440
#440 duplicated a block of code outside of `if (updateEnvironment) {` condition. This was probably an oversight when merging `main` back on the PR branch. The tests should have seen that `core.exportVariable` was being called and should have failed.
This commit is contained in:
		
							parent
							
								
									412091c1e0
								
							
						
					
					
						commit
						2c9de4ed41
					
				
							
								
								
									
										9
									
								
								dist/setup/index.js
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										9
									
								
								dist/setup/index.js
									
									
									
									
										vendored
									
									
								
							| @ -64845,15 +64845,6 @@ function useCpythonVersion(version, architecture, updateEnvironment) { | |||||||
|                 `The list of all available versions can be found here: ${installer.MANIFEST_URL}` |                 `The list of all available versions can be found here: ${installer.MANIFEST_URL}` | ||||||
|             ].join(os.EOL)); |             ].join(os.EOL)); | ||||||
|         } |         } | ||||||
|         if (utils_1.IS_LINUX) { |  | ||||||
|             const libPath = process.env.LD_LIBRARY_PATH |  | ||||||
|                 ? `:${process.env.LD_LIBRARY_PATH}` |  | ||||||
|                 : ''; |  | ||||||
|             const pyLibPath = path.join(installDir, 'lib'); |  | ||||||
|             if (!libPath.split(':').includes(pyLibPath)) { |  | ||||||
|                 core.exportVariable('LD_LIBRARY_PATH', pyLibPath + libPath); |  | ||||||
|             } |  | ||||||
|         } |  | ||||||
|         const _binDir = binDir(installDir); |         const _binDir = binDir(installDir); | ||||||
|         const binaryExtension = utils_1.IS_WINDOWS ? '.exe' : ''; |         const binaryExtension = utils_1.IS_WINDOWS ? '.exe' : ''; | ||||||
|         const pythonPath = path.join(utils_1.IS_WINDOWS ? installDir : _binDir, `python${binaryExtension}`); |         const pythonPath = path.join(utils_1.IS_WINDOWS ? installDir : _binDir, `python${binaryExtension}`); | ||||||
|  | |||||||
| @ -70,17 +70,6 @@ export async function useCpythonVersion( | |||||||
|     ); |     ); | ||||||
|   } |   } | ||||||
| 
 | 
 | ||||||
|   if (IS_LINUX) { |  | ||||||
|     const libPath = process.env.LD_LIBRARY_PATH |  | ||||||
|       ? `:${process.env.LD_LIBRARY_PATH}` |  | ||||||
|       : ''; |  | ||||||
|     const pyLibPath = path.join(installDir, 'lib'); |  | ||||||
| 
 |  | ||||||
|     if (!libPath.split(':').includes(pyLibPath)) { |  | ||||||
|       core.exportVariable('LD_LIBRARY_PATH', pyLibPath + libPath); |  | ||||||
|     } |  | ||||||
|   } |  | ||||||
| 
 |  | ||||||
|   const _binDir = binDir(installDir); |   const _binDir = binDir(installDir); | ||||||
|   const binaryExtension = IS_WINDOWS ? '.exe' : ''; |   const binaryExtension = IS_WINDOWS ? '.exe' : ''; | ||||||
|   const pythonPath = path.join( |   const pythonPath = path.join( | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user
	 mayeut
						mayeut