mirror of
https://github.com/game-ci/unity-builder.git
synced 2026-06-12 17:03:55 -07:00
fix
This commit is contained in:
+13
@@ -805,6 +805,10 @@ class CloudRunner {
|
||||
case 'local-system':
|
||||
CloudRunner.Provider = new local_1.default();
|
||||
break;
|
||||
case 'local':
|
||||
default:
|
||||
CloudRunner.Provider = new local_1.default();
|
||||
break;
|
||||
}
|
||||
}
|
||||
static async run(buildParameters, baseImage) {
|
||||
@@ -4715,6 +4719,10 @@ const cloud_runner_1 = __importDefault(__nccwpck_require__(79144));
|
||||
const cloud_runner_options_1 = __importDefault(__nccwpck_require__(66965));
|
||||
class RemoteClientLogger {
|
||||
static get LogFilePath() {
|
||||
// Use a cross-platform temporary directory for local development
|
||||
if (process.platform === 'win32') {
|
||||
return node_path_1.default.join(process.cwd(), 'temp', 'job-log.txt');
|
||||
}
|
||||
return node_path_1.default.join(`/home`, `job-log.txt`);
|
||||
}
|
||||
static log(message) {
|
||||
@@ -4733,6 +4741,11 @@ class RemoteClientLogger {
|
||||
}
|
||||
static appendToFile(message) {
|
||||
if (cloud_runner_1.default.isCloudRunnerEnvironment) {
|
||||
// Ensure the directory exists before writing
|
||||
const logDirectory = node_path_1.default.dirname(RemoteClientLogger.LogFilePath);
|
||||
if (!node_fs_1.default.existsSync(logDirectory)) {
|
||||
node_fs_1.default.mkdirSync(logDirectory, { recursive: true });
|
||||
}
|
||||
node_fs_1.default.appendFileSync(RemoteClientLogger.LogFilePath, `${message}\n`);
|
||||
}
|
||||
}
|
||||
|
||||
+1
-1
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user