Skip to content

Commit

Permalink
doc: fix typo in cjs example of util.styleText
Browse files Browse the repository at this point in the history
`errorMessage` needs to be printed instead of
`successMessage` in console.error(). ESM example is
only fixed in previous PR.

Refs: #56720
PR-URL: #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>
  • Loading branch information
deokjinkim authored and targos committed Feb 2, 2025
1 parent dfc61f7 commit d436888
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion doc/api/util.md
Original file line number Diff line number Diff line change
Expand Up @@ -1982,7 +1982,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
Expand Down

0 comments on commit d436888

Please sign in to comment.