fix: sanitize remote deploy log polling

This commit is contained in:
Codex
2026-05-16 13:13:33 +00:00
parent f092fba4ce
commit d7c496f6f5
+1 -1
View File
@@ -1031,7 +1031,7 @@ async function launchRemoteBackground(
async function pollRemoteBackground(config: UniDeskConfig, service: UniDeskMicroserviceConfig, cwd: string, logFile: string, sentinelFile: string): Promise<BackgroundPoll> {
const command = [
`if [ -f ${shellQuote(sentinelFile)} ]; then printf 'SENTINEL:%s\\n' "$(cat ${shellQuote(sentinelFile)} 2>/dev/null || true)"; else echo RUNNING; fi`,
`tail -n 100 ${shellQuote(logFile)} 2>/dev/null || true`,
`tail -n 100 ${shellQuote(logFile)} 2>/dev/null | tr -d '\\000' | LC_ALL=C sed 's/[^[:print:]\t]//g' || true`,
].join("; ");
const result = await runTargetCommand(config, service, command, cwd, shortDispatchWaitMs, shortRemoteTimeoutMs);
const stdout = result.stdout.trimEnd();