Commit 9f7bce8
committed
fix(paths): skip pino-pretty transport in compiled binaries
The Pino logger unconditionally configured `transport: { target: 'pino-pretty' }`
whenever stdout is a TTY. Pino transports spawn a worker that performs a dynamic
`require.resolve('pino-pretty')` at runtime, which cannot resolve inside Bun's
`/$bunfs/` virtual filesystem in `bun build --compile` binaries. As a result,
every CLI command crashed on startup in a real terminal:
error: unable to determine transport target for "pino-pretty"
at I (/$bunfs/root/archon-linux-x64:7:35652)
100% of fresh binary installs were unusable. Piping output (e.g. `archon
version | cat`) masked the bug because `isTTY` became false.
Compiled binaries now always emit NDJSON. Detection is inlined here because
`@archon/paths` has zero `@archon/*` dependencies; it checks both
`import.meta.dir` (covers ESM compiled binaries) and `process.execPath`
basename (covers CJS bytecode binaries where `import.meta.dir` is empty).
Fixes #9601 parent 8a44faa commit 9f7bce8
1 file changed
Lines changed: 24 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
43 | 43 | | |
44 | 44 | | |
45 | 45 | | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
46 | 65 | | |
47 | 66 | | |
48 | 67 | | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
49 | 71 | | |
50 | 72 | | |
51 | 73 | | |
52 | | - | |
| 74 | + | |
| 75 | + | |
53 | 76 | | |
54 | 77 | | |
55 | 78 | | |
| |||
0 commit comments