mirror of
https://github.com/chickensoft-games/setup-godot.git
synced 2025-08-14 12:55:08 +00:00
Removing existing installations recursively
This commit is contained in:
parent
0fb1a0852c
commit
1dbe5d2878
4
dist/index.js
generated
vendored
4
dist/index.js
generated
vendored
@ -142,7 +142,7 @@ function run(platform) {
|
||||
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);
|
||||
fs.rmdirSync(installationDir, { recursive: true });
|
||||
const godotExtractedPath = yield toolsCache.extractZip(godotDownloadedPath, installationDir);
|
||||
core.info(`✅ Godot extracted to ${godotExtractedPath}`);
|
||||
core.endGroup();
|
||||
@ -154,7 +154,7 @@ function run(platform) {
|
||||
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);
|
||||
fs.rmdirSync(exportTemplatePath, { recursive: true });
|
||||
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
@ -150,7 +150,8 @@ async function run(platform: Platform): Promise<void> {
|
||||
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)
|
||||
if (fs.existsSync(installationDir))
|
||||
fs.rmdirSync(installationDir, {recursive: true})
|
||||
|
||||
const godotExtractedPath = await toolsCache.extractZip(
|
||||
godotDownloadedPath,
|
||||
@ -174,7 +175,8 @@ async function run(platform: Platform): Promise<void> {
|
||||
)
|
||||
|
||||
// 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)
|
||||
if (fs.existsSync(exportTemplatePath))
|
||||
fs.rmdirSync(exportTemplatePath, {recursive: true})
|
||||
|
||||
const exportTemplateExtractedPath = await toolsCache.extractZip(
|
||||
templateDownloadedPath,
|
||||
|
Loading…
x
Reference in New Issue
Block a user