From 12c548b2fff60d5175d97a8db43d2c45feae40f9 Mon Sep 17 00:00:00 2001 From: Darshan Sen 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 1aec1cf5d..3bf6f48e8 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; }