Commit 2bdfea6
committed
loader: Set default 'pretty' option properly
Set the default `options.pretty` value based on stderr rather than
stdout, as this is where errors are printed.
The loader thread does not get a process.stderr.isTTY set, because its
"stderr" is actually a pipe. If `options.pretty` is not set explicitly,
the GlobalPreload's `context.port` is used to send a message from the
main thread indicating the state of stderr.isTTY.
Adds `Service.setPrettyErrors` method to enable setting this value when
needed.1 parent 949d360 commit 2bdfea6
2 files changed
+33
-6
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
| 7 | + | |
7 | 8 | | |
8 | 9 | | |
9 | 10 | | |
| |||
75 | 76 | | |
76 | 77 | | |
77 | 78 | | |
78 | | - | |
| 79 | + | |
79 | 80 | | |
80 | 81 | | |
81 | 82 | | |
| |||
123 | 124 | | |
124 | 125 | | |
125 | 126 | | |
126 | | - | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
127 | 146 | | |
128 | 147 | | |
129 | 148 | | |
| 149 | + | |
130 | 150 | | |
131 | 151 | | |
132 | 152 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
480 | 480 | | |
481 | 481 | | |
482 | 482 | | |
| 483 | + | |
483 | 484 | | |
484 | 485 | | |
485 | 486 | | |
| |||
719 | 720 | | |
720 | 721 | | |
721 | 722 | | |
722 | | - | |
| 723 | + | |
| 724 | + | |
723 | 725 | | |
724 | | - | |
725 | | - | |
726 | | - | |
| 726 | + | |
| 727 | + | |
| 728 | + | |
| 729 | + | |
| 730 | + | |
| 731 | + | |
| 732 | + | |
727 | 733 | | |
728 | 734 | | |
729 | 735 | | |
| |||
1282 | 1288 | | |
1283 | 1289 | | |
1284 | 1290 | | |
| 1291 | + | |
1285 | 1292 | | |
1286 | 1293 | | |
1287 | 1294 | | |
| |||
0 commit comments