From 47916b8b7b740981064966b3f976aa5f78427f3e Mon Sep 17 00:00:00 2001 From: Kenvin Davies Date: Wed, 24 Feb 2021 04:43:31 +0530 Subject: [PATCH] tools: fix error detection (#914) The `ChildProces` object `result` does not have an `error` property. We should use `stderr` instead. --- tools/clang-format.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/clang-format.js b/tools/clang-format.js index 1aec1cf..3bf6f48 100644 --- a/tools/clang-format.js +++ b/tools/clang-format.js @@ -21,8 +21,8 @@ function main(args) { ...filesToCheck ], { encoding: 'utf-8' }); - if (result.error) { - console.error('Error running git-clang-format:', result.error); + if (result.stderr) { + console.error('Error running git-clang-format:', result.stderr); return 2; }