Recreate bin folder after clearing

This commit is contained in:
Lulu 2024-01-30 00:24:48 +00:00
parent 0c73ef0c02
commit 25bbe6992f
3 changed files with 10 additions and 5 deletions

6
dist/index.js generated vendored
View File

@ -213,9 +213,11 @@ function run(platform) {
// Create symlink to Godot executable
const godotAlias = path_1.default.join(binDir, 'godot');
core.startGroup(`🔗 Creating symlinks to executables...`);
// If an alias already exists, remove it before creating the new alias
if (fs.existsSync(binDir))
// If an alias already exists, clear it before creating the new alias
if (fs.existsSync(binDir)) {
fs.rmSync(binDir, { recursive: true, force: true });
fs.mkdirSync(binDir, { recursive: true });
}
fs.linkSync(godotExecutable, godotAlias);
core.info(`✅ Symlink to Godot created`);
const godotSharpDirAlias = path_1.default.join(binDir, 'GodotSharp');

2
dist/index.js.map generated vendored

File diff suppressed because one or more lines are too long

View File

@ -270,8 +270,11 @@ async function run(platform: Platform): Promise<void> {
const godotAlias = path.join(binDir, 'godot')
core.startGroup(`🔗 Creating symlinks to executables...`)
// If an alias already exists, remove it before creating the new alias
if (fs.existsSync(binDir)) fs.rmSync(binDir, {recursive: true, force: true})
// If an alias already exists, clear it before creating the new alias
if (fs.existsSync(binDir)) {
fs.rmSync(binDir, {recursive: true, force: true})
fs.mkdirSync(binDir, {recursive: true})
}
fs.linkSync(godotExecutable, godotAlias)
core.info(`✅ Symlink to Godot created`)