Skip to content

Commit 1331cb0

Browse files
committed
chore: fix stderr checking
1 parent 34a9d4a commit 1331cb0

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

code/format-code.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ function visitor(node) {
1616
case 'cpp':
1717
case 'c': {
1818
const child = spawnSync('clang-format', { input: node.value });
19-
if (child.stderr.toString()) {
19+
if (child.stderr.length > 0) {
2020
console.warn(
2121
'[remark-clang-format] stderr: ',
2222
child.stderr.toString(),

0 commit comments

Comments
 (0)