From 1331cb00b8caba1918a94c875b24f34bfcada5ee Mon Sep 17 00:00:00 2001 From: mgt Date: Tue, 7 May 2024 23:22:49 +0800 Subject: [PATCH] chore: fix stderr checking --- code/format-code.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/format-code.js b/code/format-code.js index 3e7298a..edddfdc 100644 --- a/code/format-code.js +++ b/code/format-code.js @@ -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(),