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
This commit is contained in:
Mathias Wulff
2023-12-15 12:07:46 +11:00
committed by GitHub
parent 441612917d
commit fc733fe89c

View File

@@ -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"];