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>
38 lines
978 B
Text
38 lines
978 B
Text
{ foo: [32m'bar'[39m }
|
|
string q
|
|
{ foo: [32m'bar'[39m } with object format param
|
|
|
|
Error: test
|
|
at abc (../fixtures/node_modules/bar.js:4:4)
|
|
foobar
|
|
at Object.<anonymous> [90m(*[39m*console_colors.js:*:*[90m)[39m
|
|
[90m at * (node:internal*:*:*)[39m
|
|
[90m at *[39m
|
|
[90m at *[39m
|
|
[90m at *[39m
|
|
[90m at *[39m
|
|
[90m at *[39m
|
|
|
|
Error: Should not ever get here.
|
|
at Object.<anonymous> [90m(*node_modules*[4m*node_modules*[24m*bar.js:*:*[90m)[39m
|
|
[90m at *[39m
|
|
[90m at *[39m
|
|
[90m at *[39m
|
|
[90m at *[39m
|
|
[90m at *[39m
|
|
[90m at *[39m
|
|
at Object.<anonymous> [90m(*console_colors.js:*:*[90m)[39m
|
|
[90m at *[39m
|
|
[90m at *[39m
|
|
|
|
Error
|
|
at evalmachine.<anonymous>:*:*
|
|
[90m at Script.runInThisContext (node:vm:*:*)[39m
|
|
[90m at Object.runInThisContext (node:vm:*:*)[39m
|
|
at Object.<anonymous> [90m(*[39m*console_colors.js:*:*[90m)[39m
|
|
[90m at *[39m
|
|
[90m at *[39m
|
|
[90m at *[39m
|
|
[90m at *[39m
|
|
[90m at *[39m
|
|
[90m at *[39m
|