fix: sanitize remote deploy log polling
This commit is contained in:
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user