From fc733fe89cce8d090310732ca01e30b3e6cbf3eb Mon Sep 17 00:00:00 2001 From: Mathias Wulff Date: Fri, 15 Dec 2023 12:07:46 +1100 Subject: [PATCH] Use stderr for info about how to open inspector (#7270) * Use stderr for info about how to open inspector * Write to stderr without red colors --- src/js/internal/debugger.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/js/internal/debugger.ts b/src/js/internal/debugger.ts index 62020ac5bf..7c8165e6dd 100644 --- a/src/js/internal/debugger.ts +++ b/src/js/internal/debugger.ts @@ -20,12 +20,12 @@ export default function ( const { protocol, href, host, pathname } = debug.url; if (!protocol.includes("unix")) { - console.log(dim("--------------------- Bun Inspector ---------------------"), reset()); - console.log(`Listening:\n ${dim(href)}`); + Bun.write(Bun.stderr, dim("--------------------- Bun Inspector ---------------------") + reset() + "\n"); + Bun.write(Bun.stderr, `Listening:\n ${dim(href)}\n`); if (protocol.includes("ws")) { - console.log(`Inspect in browser:\n ${link(`https://debug.bun.sh/#${host}${pathname}`)}`); + Bun.write(Bun.stderr, `Inspect in browser:\n ${link(`https://debug.bun.sh/#${host}${pathname}`)}\n`); } - console.log(dim("--------------------- Bun Inspector ---------------------"), reset()); + Bun.write(Bun.stderr, dim("--------------------- Bun Inspector ---------------------")+ reset() + "\n"); } const unix = process.env["BUN_INSPECT_NOTIFY"];