Commit b7b6f5d
fix: report Bun runtime in environment info (#5700)
`codecept info` and the machine-info block printed by `run --verbose`,
`run-workers --verbose` and `check` hardcoded
`envinfo.helpers.getNodeInfo()`, which probes PATH rather than the running
process. Under Bun that is wrong in two ways:
- `nodeInfo: Not Found` on a working install, either because the image has
no Node at all, or because `bunx --bun` prepends a shim dir whose `node`
re-execs Bun and rejects `--version`.
- A real but irrelevant Node version when some Node happens to be on PATH,
which is worse because it looks correct.
Pick the helper by the runtime that is actually executing, via
`process.versions.bun`, and report Bun through `envinfo.helpers.getbunInfo()`
so both runtimes are resolved the same way.
Node output is unchanged. The returned array keeps the shape of
`getNodeInfo()`, so the existing `Array.isArray` printer shows the version at
index 1 with no printer change.
Closes #5698
Co-authored-by: Jaromir Obr <jobr@spork.tech>
Co-authored-by: Claude Opus 5 <noreply@anthropic.com>1 parent d85b22e commit b7b6f5d
2 files changed
Lines changed: 52 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
44 | 44 | | |
45 | 45 | | |
46 | 46 | | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
47 | 55 | | |
48 | 56 | | |
49 | 57 | | |
| |||
53 | 61 | | |
54 | 62 | | |
55 | 63 | | |
56 | | - | |
| 64 | + | |
57 | 65 | | |
58 | 66 | | |
59 | 67 | | |
| |||
77 | 85 | | |
78 | 86 | | |
79 | 87 | | |
80 | | - | |
| 88 | + | |
81 | 89 | | |
82 | 90 | | |
83 | 91 | | |
84 | | - | |
| 92 | + | |
85 | 93 | | |
86 | 94 | | |
87 | 95 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | | - | |
| 2 | + | |
3 | 3 | | |
4 | 4 | | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
5 | 45 | | |
6 | 46 | | |
7 | 47 | | |
| |||
0 commit comments