Skip to content

Commit

Permalink
chore: fix stderr checking
Browse files Browse the repository at this point in the history
  • Loading branch information
Enter-tainer committed May 7, 2024
1 parent 34a9d4a commit 1331cb0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion code/format-code.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ function visitor(node) {
case 'cpp':
case 'c': {
const child = spawnSync('clang-format', { input: node.value });
if (child.stderr.toString()) {
if (child.stderr.length > 0) {
console.warn(
'[remark-clang-format] stderr: ',
child.stderr.toString(),
Expand Down

0 comments on commit 1331cb0

Please sign in to comment.