This changes the util.inspect() output for errors in case stack traces contain the current working directory in their trace. If that's the case, the cwd part is marked grey to focus on the rest of the path. Signed-off-by: Ruben Bridgewater <ruben@bridgewater.de> PR-URL: https://github.com/nodejs/node/pull/41082 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
16 lines
361 B
Text
16 lines
361 B
Text
*test-fatal-error.js:*
|
|
throw err;
|
|
^
|
|
|
|
TypeError: foobar
|
|
at Object.<anonymous> [90m(*test-fatal-error.js:*:*[90m)[39m
|
|
[90m at *(node:internal*loader:*:*)[39m
|
|
[90m at *(node:internal*loader:*:*)[39m
|
|
[90m at *(node:internal*loader:*:*)[39m
|
|
[90m at *(node:internal*loader:*:*)[39m
|
|
[90m at *[39m
|
|
[90m at *[39m {
|
|
bla: [33mtrue[39m
|
|
}
|
|
|
|
Node.js *
|