Compare commits

...

1 Commits
v2.1.2 ... main

Author SHA1 Message Date
Mateusz Budzisz
92cdaf8c4a
MacOS Godot executable killed by Kernel (Killed: 9) (#101)
* ln test

* final
2025-08-09 18:55:26 -05:00
3 changed files with 31 additions and 3 deletions

20
dist/index.js generated vendored
View File

@ -57,6 +57,8 @@ const core = __importStar(__nccwpck_require__(7484));
const toolsCache = __importStar(__nccwpck_require__(3472));
const fs = __importStar(__nccwpck_require__(9896));
const os = __importStar(__nccwpck_require__(857));
const child_process = __importStar(__nccwpck_require__(5317));
const process = __importStar(__nccwpck_require__(932));
const path_1 = __importDefault(__nccwpck_require__(6928));
const utils_1 = __nccwpck_require__(9277);
function run(platform) {
@ -254,7 +256,15 @@ function run(platform) {
fs.rmSync(binDir, { recursive: true, force: true });
fs.mkdirSync(binDir, { recursive: true });
}
fs.linkSync(godotExecutable, godotAlias);
// `fs.linkSync` has some issues on macOS for Godot executable
// it does not create symlink at all, it copies whole file
// and corrupts it a way that Godot gets killed by kernel (Killed: 9)
if (process.platform === "darwin") {
child_process.execSync(`ln -s "${godotExecutable}" "${godotAlias}"`);
}
else {
fs.linkSync(godotExecutable, godotAlias);
}
core.info(`✅ Symlink to Godot created`);
const godotSharpDirAlias = path_1.default.join(binDir, 'GodotSharp');
if (useDotnet) {
@ -89208,6 +89218,14 @@ module.exports = require("perf_hooks");
/***/ }),
/***/ 932:
/***/ ((module) => {
"use strict";
module.exports = require("process");
/***/ }),
/***/ 4876:
/***/ ((module) => {

2
dist/index.js.map generated vendored

File diff suppressed because one or more lines are too long

View File

@ -3,6 +3,8 @@ import * as core from '@actions/core'
import * as toolsCache from '@actions/tool-cache'
import * as fs from 'fs'
import * as os from 'os'
import * as child_process from 'child_process'
import * as process from 'process'
import path from 'path'
import {
@ -295,7 +297,15 @@ async function run(platform: Platform): Promise<void> {
fs.mkdirSync(binDir, {recursive: true})
}
fs.linkSync(godotExecutable, godotAlias)
// `fs.linkSync` has some issues on macOS for Godot executable
// it does not create symlink at all, it copies whole file
// and corrupts it a way that Godot gets killed by kernel (Killed: 9)
if (process.platform === "darwin") {
child_process.execSync(`ln -s "${godotExecutable}" "${godotAlias}"`)
} else {
fs.linkSync(godotExecutable, godotAlias)
}
core.info(`✅ Symlink to Godot created`)
const godotSharpDirAlias = path.join(binDir, 'GodotSharp')
if (useDotnet) {