This commit is contained in:
Frostebite
2025-08-28 06:48:50 +01:00
parent e9a60d4ec8
commit 0650d1de5c
10 changed files with 96 additions and 34 deletions
Generated Vendored
+13
View File
@@ -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`);
}
}
Generated Vendored
+1 -1
View File
File diff suppressed because one or more lines are too long