mirror of
				https://github.com/chickensoft-games/setup-godot.git
				synced 2025-10-31 15:53:56 +00:00 
			
		
		
		
	Removing existing installations before extracting downloaded ZIP
This commit is contained in:
		
							parent
							
								
									1cfb3bae72
								
							
						
					
					
						commit
						0fb1a0852c
					
				
							
								
								
									
										6
									
								
								dist/index.js
									
									
									
										generated
									
									
										vendored
									
									
								
							
							
						
						
									
										6
									
								
								dist/index.js
									
									
									
										generated
									
									
										vendored
									
									
								
							| @ -140,6 +140,9 @@ function run(platform) { | ||||
|                 core.endGroup(); | ||||
|                 // Extract Godot
 | ||||
|                 core.startGroup(`📦 Extracting Godot to ${installationDir}...`); | ||||
|                 // If the export template folder already exists, remove it before extracting the ZIP file. This will "uninstall" other installations (e.g. on version changes).
 | ||||
|                 if (fs.existsSync(installationDir)) | ||||
|                     fs.rmdirSync(installationDir); | ||||
|                 const godotExtractedPath = yield toolsCache.extractZip(godotDownloadedPath, installationDir); | ||||
|                 core.info(`✅ Godot extracted to ${godotExtractedPath}`); | ||||
|                 core.endGroup(); | ||||
| @ -149,6 +152,9 @@ function run(platform) { | ||||
|                 core.info(`✅ Files shown`); | ||||
|                 core.endGroup(); | ||||
|                 core.startGroup(`📦 Extracting Export Templates to ${exportTemplatePath}...`); | ||||
|                 // If the export template folder already exists, remove it before extracting the ZIP file. This will "uninstall" other installations (e.g. on version changes).
 | ||||
|                 if (fs.existsSync(exportTemplatePath)) | ||||
|                     fs.rmdirSync(exportTemplatePath); | ||||
|                 const exportTemplateExtractedPath = yield toolsCache.extractZip(templateDownloadedPath, path_1.default.dirname(exportTemplatePath)); | ||||
|                 core.info(`✅ Export Templates extracted to ${exportTemplateExtractedPath}`); | ||||
|                 fs.renameSync(path_1.default.join(exportTemplateExtractedPath, 'templates'), exportTemplatePath); | ||||
|  | ||||
							
								
								
									
										2
									
								
								dist/index.js.map
									
									
									
										generated
									
									
										vendored
									
									
								
							
							
						
						
									
										2
									
								
								dist/index.js.map
									
									
									
										generated
									
									
										vendored
									
									
								
							
										
											
												File diff suppressed because one or more lines are too long
											
										
									
								
							| @ -148,6 +148,10 @@ async function run(platform: Platform): Promise<void> { | ||||
| 
 | ||||
|       // Extract Godot
 | ||||
|       core.startGroup(`📦 Extracting Godot to ${installationDir}...`) | ||||
| 
 | ||||
|       // If the export template folder already exists, remove it before extracting the ZIP file. This will "uninstall" other installations (e.g. on version changes).
 | ||||
|       if (fs.existsSync(installationDir)) fs.rmdirSync(installationDir) | ||||
| 
 | ||||
|       const godotExtractedPath = await toolsCache.extractZip( | ||||
|         godotDownloadedPath, | ||||
|         installationDir | ||||
| @ -168,6 +172,10 @@ async function run(platform: Platform): Promise<void> { | ||||
|       core.startGroup( | ||||
|         `📦 Extracting Export Templates to ${exportTemplatePath}...` | ||||
|       ) | ||||
| 
 | ||||
|       // If the export template folder already exists, remove it before extracting the ZIP file. This will "uninstall" other installations (e.g. on version changes).
 | ||||
|       if (fs.existsSync(exportTemplatePath)) fs.rmdirSync(exportTemplatePath) | ||||
| 
 | ||||
|       const exportTemplateExtractedPath = await toolsCache.extractZip( | ||||
|         templateDownloadedPath, | ||||
|         path.dirname(exportTemplatePath) | ||||
|  | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user