Skip to content

Commit 789ba4f

Browse files
joehanfredzqm
andauthored
Fix leaky logger (#8603)
Co-authored-by: Fred Zhang <[email protected]>
1 parent 2ad870c commit 789ba4f

File tree

3 files changed

+4
-2
lines changed

3 files changed

+4
-2
lines changed

src/command.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -311,7 +311,7 @@ export class Command {
311311

312312
if (getInheritedOption(options, "json")) {
313313
options.nonInteractive = true;
314-
} else {
314+
} else if (!options.isMCP) {
315315
useConsoleLoggers();
316316
}
317317

src/mcp/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,7 @@ export class FirebaseMcpServer {
140140
}
141141

142142
async resolveOptions(): Promise<Partial<Options>> {
143-
const options: Partial<Options> = { cwd: this.cachedProjectRoot };
143+
const options: Partial<Options> = { cwd: this.cachedProjectRoot, isMCP: true };
144144
await cmd.prepare(options);
145145
return options;
146146
}

src/options.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,8 @@ export interface BaseOptions {
2828
// Emulator specific import/export options
2929
exportOnExit?: boolean | string;
3030
import?: string;
31+
32+
isMCP?: boolean;
3133
}
3234

3335
export interface Options extends BaseOptions {

0 commit comments

Comments
 (0)