Skip to content

Commit bfe6937

Browse files
committed
fix(cli): keep docker login output out of build failure logs
Login output was collected into the shared build log buffer, so any build failure printed docker's unencrypted-credentials warning amid the error output. Scope it to the login step, surfaced only when the login itself fails.
1 parent 83af2d2 commit bfe6937

2 files changed

Lines changed: 11 additions & 2 deletions

File tree

‎.changeset/dry-mirrors-shake.md‎

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"trigger.dev": patch
3+
---
4+
5+
Build failure logs no longer include docker's credential-storage warning from the registry login step.

‎packages/cli-v3/src/deploy/buildImage.ts‎

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -514,16 +514,20 @@ async function localBuildImage(options: SelfHostedBuildImageOptions): Promise<Bu
514514
loginProcess.process?.stdin?.write(credentials.password);
515515
loginProcess.process?.stdin?.end();
516516

517+
// Kept out of `errors` so login noise (e.g. docker's unencrypted-credentials
518+
// warning) doesn't surface in build failure logs.
519+
const loginLogs: string[] = [];
520+
517521
for await (const line of loginProcess) {
518-
errors.push(line);
522+
loginLogs.push(line);
519523
logger.debug(line);
520524
}
521525

522526
if (loginProcess.exitCode !== 0) {
523527
return {
524528
ok: false as const,
525529
error: `Failed to login to registry: ${cloudRegistryHost}`,
526-
logs: extractLogs(errors),
530+
logs: extractLogs(loginLogs),
527531
};
528532
}
529533

0 commit comments

Comments
 (0)