doc: fix typo in cjs example of util.styleText

`errorMessage` needs to be printed instead of
`successMessage` in console.error(). ESM example is
only fixed in previous PR.

Refs: https://github.com/nodejs/node/pull/56720
PR-URL: https://github.com/nodejs/node/pull/56769
Reviewed-By: Ulises Gascón <ulisesgascongonzalez@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Jason Zhang <xzha4350@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
This commit is contained in:
Deokjin Kim authored and GitHub committed 2025-01-30 02:02:58 +00:00
1 parent 5557ce4aec
commit 7f18407d0f
1 file changed
+1 -1
+1 -1
View File
@@ -1988,7 +1988,7 @@ const errorMessage = styleText(
// Validate if process.stderr has TTY
{ stream: stderr },
);
console.error(successMessage);
console.error(errorMessage);
```
`util.inspect.colors` also provides text formats such as `italic`, and