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 Jan 30, 2025
1 parent 5557ce4 commit 7f18407
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 @@ -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
Expand Down

0 comments on commit 7f18407

Please sign in to comment.