mirror of
https://github.com/chickensoft-games/setup-godot.git
synced 2025-08-14 21:05:06 +00:00
Removing existing aliases before creating a new alias
This commit is contained in:
parent
4f18ec9fb1
commit
1cfb3bae72
6
dist/index.js
generated
vendored
6
dist/index.js
generated
vendored
@ -207,12 +207,18 @@ function run(platform) {
|
|||||||
// Create symlink to Godot executable
|
// Create symlink to Godot executable
|
||||||
const godotAlias = path_1.default.join(binDir, 'godot');
|
const godotAlias = path_1.default.join(binDir, 'godot');
|
||||||
core.startGroup(`🔗 Creating symlinks to executables...`);
|
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);
|
||||||
fs.linkSync(godotExecutable, godotAlias);
|
fs.linkSync(godotExecutable, godotAlias);
|
||||||
core.info(`✅ Symlink to Godot created`);
|
core.info(`✅ Symlink to Godot created`);
|
||||||
const godotSharpDirAlias = path_1.default.join(binDir, 'GodotSharp');
|
const godotSharpDirAlias = path_1.default.join(binDir, 'GodotSharp');
|
||||||
if (useDotnet) {
|
if (useDotnet) {
|
||||||
// Create symlink to GodotSharp directory
|
// Create symlink to GodotSharp directory
|
||||||
const godotSharpDir = path_1.default.join(path_1.default.dirname(godotSharp), '../..');
|
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);
|
fs.symlinkSync(godotSharpDir, godotSharpDirAlias);
|
||||||
core.info(`✅ Symlink to GodotSharp created at ${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
@ -259,12 +259,20 @@ async function run(platform: Platform): Promise<void> {
|
|||||||
// Create symlink to Godot executable
|
// Create symlink to Godot executable
|
||||||
const godotAlias = path.join(binDir, 'godot')
|
const godotAlias = path.join(binDir, 'godot')
|
||||||
core.startGroup(`🔗 Creating symlinks to executables...`)
|
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)
|
||||||
|
|
||||||
fs.linkSync(godotExecutable, godotAlias)
|
fs.linkSync(godotExecutable, godotAlias)
|
||||||
core.info(`✅ Symlink to Godot created`)
|
core.info(`✅ Symlink to Godot created`)
|
||||||
const godotSharpDirAlias = path.join(binDir, 'GodotSharp')
|
const godotSharpDirAlias = path.join(binDir, 'GodotSharp')
|
||||||
if (useDotnet) {
|
if (useDotnet) {
|
||||||
// Create symlink to GodotSharp directory
|
// Create symlink to GodotSharp directory
|
||||||
const godotSharpDir = path.join(path.dirname(godotSharp), '../..')
|
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)
|
fs.symlinkSync(godotSharpDir, godotSharpDirAlias)
|
||||||
core.info(`✅ Symlink to GodotSharp created at ${godotSharpDirAlias}`)
|
core.info(`✅ Symlink to GodotSharp created at ${godotSharpDirAlias}`)
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user