MacOS Godot executable killed by Kernel (Killed: 9) (#101)

* ln test

* final
This commit is contained in:
Mateusz Budzisz 2025-08-10 01:55:26 +02:00 committed by GitHub
parent fe568faee5
commit 92cdaf8c4a
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
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 toolsCache = __importStar(__nccwpck_require__(3472));
const fs = __importStar(__nccwpck_require__(9896)); const fs = __importStar(__nccwpck_require__(9896));
const os = __importStar(__nccwpck_require__(857)); 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 path_1 = __importDefault(__nccwpck_require__(6928));
const utils_1 = __nccwpck_require__(9277); const utils_1 = __nccwpck_require__(9277);
function run(platform) { function run(platform) {
@ -254,7 +256,15 @@ function run(platform) {
fs.rmSync(binDir, { recursive: true, force: true }); fs.rmSync(binDir, { recursive: true, force: true });
fs.mkdirSync(binDir, { recursive: 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`); 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) {
@ -89208,6 +89218,14 @@ module.exports = require("perf_hooks");
/***/ }), /***/ }),
/***/ 932:
/***/ ((module) => {
"use strict";
module.exports = require("process");
/***/ }),
/***/ 4876: /***/ 4876:
/***/ ((module) => { /***/ ((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 toolsCache from '@actions/tool-cache'
import * as fs from 'fs' import * as fs from 'fs'
import * as os from 'os' import * as os from 'os'
import * as child_process from 'child_process'
import * as process from 'process'
import path from 'path' import path from 'path'
import { import {
@ -295,7 +297,15 @@ async function run(platform: Platform): Promise<void> {
fs.mkdirSync(binDir, {recursive: 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`) core.info(`✅ Symlink to Godot created`)
const godotSharpDirAlias = path.join(binDir, 'GodotSharp') const godotSharpDirAlias = path.join(binDir, 'GodotSharp')
if (useDotnet) { if (useDotnet) {