Skip to content

Commit 48b73e8

Browse files
committed
fix(cli): keep docker's credential warning out of build logs
The registry login step's output was collected into the shared build log buffer, so build logs on self-hosted and local builds always carried docker's unencrypted-credentials warning. Filter those lines while the rest of the login output (e.g. Login Succeeded) still flows through; the login-failure path keeps the full login output.
1 parent 83af2d2 commit 48b73e8

2 files changed

Lines changed: 15 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+
Fixes docker's credential-storage warning appearing in build logs on self-hosted and local builds.

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

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

517+
// docker login always warns about unencrypted credential storage; keep that noise
518+
// out of the build logs while the rest of the login output flows through.
519+
const loginNoise = /credentials are stored unencrypted|credential helper|credential-store/i;
520+
const loginLogs: string[] = [];
521+
517522
for await (const line of loginProcess) {
518-
errors.push(line);
523+
loginLogs.push(line);
524+
if (!loginNoise.test(line)) {
525+
errors.push(line);
526+
}
519527
logger.debug(line);
520528
}
521529

522530
if (loginProcess.exitCode !== 0) {
523531
return {
524532
ok: false as const,
525533
error: `Failed to login to registry: ${cloudRegistryHost}`,
526-
logs: extractLogs(errors),
534+
logs: extractLogs(loginLogs),
527535
};
528536
}
529537

0 commit comments

Comments
 (0)