mirror of
				https://gitea.com/actions/setup-python.git
				synced 2025-10-31 00:58:07 +07:00 
			
		
		
		
	Improve find-python to add "Scripts" folder to PATH on Windows machines (#169)
* added 'Scripts' folder to PATH on Windows * add release code * update index.js * rebuild index.js * remove duplicate block Co-authored-by: Nikita Bykov <v-nibyko@microsoft.com> Co-authored-by: Dmitry Shibanov <dmitry-shibanov@github.com>
This commit is contained in:
		
							parent
							
								
									3b3f2de1b1
								
							
						
					
					
						commit
						2831efe49a
					
				
							
								
								
									
										4
									
								
								dist/index.js
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										4
									
								
								dist/index.js
									
									
									
									
										vendored
									
									
								
							| @ -6738,6 +6738,10 @@ function usePyPy(majorVersion, architecture) { | |||||||
|     core.exportVariable('pythonLocation', pythonLocation); |     core.exportVariable('pythonLocation', pythonLocation); | ||||||
|     core.addPath(installDir); |     core.addPath(installDir); | ||||||
|     core.addPath(_binDir); |     core.addPath(_binDir); | ||||||
|  |     // Starting from PyPy 7.3.1, the folder that is used for pip and anything that pip installs should be "Scripts" on Windows.
 | ||||||
|  |     if (IS_WINDOWS) { | ||||||
|  |         core.addPath(path.join(installDir, 'Scripts')); | ||||||
|  |     } | ||||||
|     const impl = 'pypy' + majorVersion.toString(); |     const impl = 'pypy' + majorVersion.toString(); | ||||||
|     core.setOutput('python-version', impl); |     core.setOutput('python-version', impl); | ||||||
|     return { impl: impl, version: versionFromPath(installDir) }; |     return { impl: impl, version: versionFromPath(installDir) }; | ||||||
|  | |||||||
| @ -66,6 +66,10 @@ function usePyPy( | |||||||
| 
 | 
 | ||||||
|   core.addPath(installDir); |   core.addPath(installDir); | ||||||
|   core.addPath(_binDir); |   core.addPath(_binDir); | ||||||
|  |   // Starting from PyPy 7.3.1, the folder that is used for pip and anything that pip installs should be "Scripts" on Windows.
 | ||||||
|  |   if (IS_WINDOWS) { | ||||||
|  |     core.addPath(path.join(installDir, 'Scripts')); | ||||||
|  |   } | ||||||
| 
 | 
 | ||||||
|   const impl = 'pypy' + majorVersion.toString(); |   const impl = 'pypy' + majorVersion.toString(); | ||||||
|   core.setOutput('python-version', impl); |   core.setOutput('python-version', impl); | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user