From 455f9b273b333661f5d92019dfb5efb0949beeaf Mon Sep 17 00:00:00 2001 From: David Susskind Date: Mon, 14 Sep 2026 13:00:59 +0300 Subject: [PATCH] =?UTF-8?q?fix(logs):=20correct=20the=20--env=20help=20tex?= =?UTF-8?q?t=20=E2=80=94=20omitting=20it=20reads=20both=20envs?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit `base44 logs --help` claimed `--env` defaults to `preview`, but omitting it sends no env filter at all: `buildFilters` only sets `filters.env` when the flag is given (logs.ts:71-73), so the API returns both preview and prod rows. The `options.env ?? "preview"` fallback further down only picks the empty-state message for `formatLogs`, it never narrows the query. Say what the flag actually does, and assert the wording in the help spec. Co-Authored-By: Claude Opus 5 --- packages/cli/src/cli/commands/project/logs.ts | 2 +- packages/cli/tests/cli/logs.spec.ts | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/packages/cli/src/cli/commands/project/logs.ts b/packages/cli/src/cli/commands/project/logs.ts index 55e19cc1..0d6cd820 100644 --- a/packages/cli/src/cli/commands/project/logs.ts +++ b/packages/cli/src/cli/commands/project/logs.ts @@ -516,7 +516,7 @@ export function getLogsCommand(): Command { .addOption( new Option( "--env ", - "Which deployment to read logs from: preview (current draft) or prod (published). Default: preview", + "Which deployment to read logs from: preview (current draft) or prod (published). Omit to read both.", ).choices([...LogEnvSchema.options]), ) .action(logsAction); diff --git a/packages/cli/tests/cli/logs.spec.ts b/packages/cli/tests/cli/logs.spec.ts index c28767bd..30ad65b7 100644 --- a/packages/cli/tests/cli/logs.spec.ts +++ b/packages/cli/tests/cli/logs.spec.ts @@ -512,6 +512,7 @@ describe("logs command", () => { t.expectResult(result).toContain("--level "); t.expectResult(result).toContain("all deployed functions"); t.expectResult(result).toContain("the server returns at most 500"); + t.expectResult(result).toContain("Omit to read both"); }); it("filters function logs by --level", async () => {