mirror of
https://github.com/oven-sh/bun
synced 2026-02-09 10:28:47 +00:00
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:
@@ -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"];
|
||||
|
||||
Reference in New Issue
Block a user