mirror of
https://github.com/game-ci/unity-builder.git
synced 2026-06-17 05:26:47 -07:00
pr feedback
This commit is contained in:
+10
-2
@@ -5647,10 +5647,18 @@ class RemoteClient {
|
|||||||
const successMessage = `Activation successful`;
|
const successMessage = `Activation successful`;
|
||||||
// Write to stdout so it gets piped through remote-cli-log-stream when invoked via pipe
|
// 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
|
// This ensures the message is captured in BuildResults for all providers
|
||||||
// Stdout flushes automatically on newline
|
// Use synchronous write and ensure newline is included for proper flushing
|
||||||
process.stdout.write(`${successMessage}\n`);
|
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
|
// 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
|
// 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);
|
remote_client_logger_1.RemoteClientLogger.log(successMessage);
|
||||||
cloud_runner_logger_1.default.log(successMessage);
|
cloud_runner_logger_1.default.log(successMessage);
|
||||||
return new Promise((result) => result(``));
|
return new Promise((result) => result(``));
|
||||||
|
|||||||
+1
-1
File diff suppressed because one or more lines are too long
@@ -171,11 +171,20 @@ export class RemoteClient {
|
|||||||
|
|
||||||
// Write to stdout so it gets piped through remote-cli-log-stream when invoked via pipe
|
// 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
|
// This ensures the message is captured in BuildResults for all providers
|
||||||
// Stdout flushes automatically on newline
|
// Use synchronous write and ensure newline is included for proper flushing
|
||||||
process.stdout.write(`${successMessage}\n`);
|
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
|
// 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
|
// 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);
|
RemoteClientLogger.log(successMessage);
|
||||||
CloudRunnerLogger.log(successMessage);
|
CloudRunnerLogger.log(successMessage);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user