pr feedback

pull/767/head
Frostebite 2025-12-10 16:58:51 +00:00
parent 6e82b74240
commit 5011678ad1
3 changed files with 22 additions and 5 deletions

12
dist/index.js vendored
View File

@ -5647,10 +5647,18 @@ class RemoteClient {
const successMessage = `Activation successful`;
// Write to stdout so it gets piped through remote-cli-log-stream when invoked via pipe
// This ensures the message is captured in BuildResults for all providers
// Stdout flushes automatically on newline
process.stdout.write(`${successMessage}\n`);
// Use synchronous write and ensure newline is included for proper flushing
process.stdout.write(`${successMessage}\n`, 'utf8');
// Ensure stdout is flushed before process exits (critical for K8s where process might exit quickly)
// For non-TTY streams, we need to explicitly ensure the write completes
if (!process.stdout.isTTY) {
// Give the pipe a moment to process the write
await new Promise((resolve) => setTimeout(resolve, 100));
}
// Also log via CloudRunnerLogger and RemoteClientLogger for GitHub Actions and log file
// This ensures the message appears in log files for providers that read from log files
// RemoteClientLogger.log writes directly to the log file, which is important for providers
// that read from the log file rather than stdout
remote_client_logger_1.RemoteClientLogger.log(successMessage);
cloud_runner_logger_1.default.log(successMessage);
return new Promise((result) => result(``));

2
dist/index.js.map vendored

File diff suppressed because one or more lines are too long

View File

@ -171,11 +171,20 @@ export class RemoteClient {
// Write to stdout so it gets piped through remote-cli-log-stream when invoked via pipe
// This ensures the message is captured in BuildResults for all providers
// Stdout flushes automatically on newline
process.stdout.write(`${successMessage}\n`);
// Use synchronous write and ensure newline is included for proper flushing
process.stdout.write(`${successMessage}\n`, 'utf8');
// Ensure stdout is flushed before process exits (critical for K8s where process might exit quickly)
// For non-TTY streams, we need to explicitly ensure the write completes
if (!process.stdout.isTTY) {
// Give the pipe a moment to process the write
await new Promise((resolve) => setTimeout(resolve, 100));
}
// Also log via CloudRunnerLogger and RemoteClientLogger for GitHub Actions and log file
// This ensures the message appears in log files for providers that read from log files
// RemoteClientLogger.log writes directly to the log file, which is important for providers
// that read from the log file rather than stdout
RemoteClientLogger.log(successMessage);
CloudRunnerLogger.log(successMessage);