mirror of
				https://kkgithub.com/actions/setup-python.git
				synced 2025-11-04 12:44:05 +08:00 
			
		
		
		
	Fix path of extracted folder for Python (#118)
* fixed path for pythonExtractedFolder * build on node v12 * updated index.js * removed fileName variable Co-authored-by: Nikita Bykov <v-nibyko@microsoft.com>
This commit is contained in:
		
							
								
								
									
										9796
									
								
								dist/index.js
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										9796
									
								
								dist/index.js
									
									
									
									
										vendored
									
									
								
							
										
											
												File diff suppressed because it is too large
												Load Diff
											
										
									
								
							@ -58,13 +58,12 @@ export async function installCpythonFromRelease(release: tc.IToolRelease) {
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
  core.info(`Download from "${downloadUrl}"`);
 | 
					  core.info(`Download from "${downloadUrl}"`);
 | 
				
			||||||
  const pythonPath = await tc.downloadTool(downloadUrl, undefined, AUTH);
 | 
					  const pythonPath = await tc.downloadTool(downloadUrl, undefined, AUTH);
 | 
				
			||||||
  const fileName = path.basename(pythonPath, '.zip');
 | 
					 | 
				
			||||||
  core.info('Extract downloaded archive');
 | 
					  core.info('Extract downloaded archive');
 | 
				
			||||||
  let pythonExtractedFolder;
 | 
					  let pythonExtractedFolder;
 | 
				
			||||||
  if (IS_WINDOWS) {
 | 
					  if (IS_WINDOWS) {
 | 
				
			||||||
    pythonExtractedFolder = await tc.extractZip(pythonPath, `./${fileName}`);
 | 
					    pythonExtractedFolder = await tc.extractZip(pythonPath);
 | 
				
			||||||
  } else {
 | 
					  } else {
 | 
				
			||||||
    pythonExtractedFolder = await tc.extractTar(pythonPath, `./${fileName}`);
 | 
					    pythonExtractedFolder = await tc.extractTar(pythonPath);
 | 
				
			||||||
  }
 | 
					  }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  core.info('Execute installation script');
 | 
					  core.info('Execute installation script');
 | 
				
			||||||
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user