mirror of
https://github.com/chickensoft-games/setup-godot.git
synced 2025-08-15 13:25:07 +00:00
Remove bin directory before creating aliases
This commit is contained in:
parent
1dbe5d2878
commit
0c73ef0c02
7
dist/index.js
generated
vendored
7
dist/index.js
generated
vendored
@ -214,17 +214,14 @@ function run(platform) {
|
||||
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(godotAlias))
|
||||
fs.unlinkSync(godotAlias);
|
||||
if (fs.existsSync(binDir))
|
||||
fs.rmSync(binDir, { recursive: true, force: true });
|
||||
fs.linkSync(godotExecutable, godotAlias);
|
||||
core.info(`✅ Symlink to Godot created`);
|
||||
const godotSharpDirAlias = path_1.default.join(binDir, 'GodotSharp');
|
||||
if (useDotnet) {
|
||||
// Create symlink to GodotSharp directory
|
||||
const godotSharpDir = path_1.default.join(path_1.default.dirname(godotSharp), '../..');
|
||||
// If an alias already exists, remove it before creating the new alias
|
||||
if (fs.existsSync(godotSharpDirAlias))
|
||||
fs.unlinkSync(godotSharpDirAlias);
|
||||
fs.symlinkSync(godotSharpDir, godotSharpDirAlias);
|
||||
core.info(`✅ Symlink to GodotSharp created at ${godotSharpDirAlias}`);
|
||||
}
|
||||
|
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
@ -271,7 +271,7 @@ async function run(platform: Platform): Promise<void> {
|
||||
core.startGroup(`🔗 Creating symlinks to executables...`)
|
||||
|
||||
// If an alias already exists, remove it before creating the new alias
|
||||
if (fs.existsSync(godotAlias)) fs.unlinkSync(godotAlias)
|
||||
if (fs.existsSync(binDir)) fs.rmSync(binDir, {recursive: true, force: true})
|
||||
|
||||
fs.linkSync(godotExecutable, godotAlias)
|
||||
core.info(`✅ Symlink to Godot created`)
|
||||
@ -279,10 +279,6 @@ async function run(platform: Platform): Promise<void> {
|
||||
if (useDotnet) {
|
||||
// Create symlink to GodotSharp directory
|
||||
const godotSharpDir = path.join(path.dirname(godotSharp), '../..')
|
||||
|
||||
// If an alias already exists, remove it before creating the new alias
|
||||
if (fs.existsSync(godotSharpDirAlias)) fs.unlinkSync(godotSharpDirAlias)
|
||||
|
||||
fs.symlinkSync(godotSharpDir, godotSharpDirAlias)
|
||||
core.info(`✅ Symlink to GodotSharp created at ${godotSharpDirAlias}`)
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user