Skip to content

Commit

Permalink
tools: fix error detection (#914)
Browse files Browse the repository at this point in the history
The `ChildProces` object `result` does not have an `error` property. We
should use `stderr` instead.
  • Loading branch information
kevindavies8 committed Feb 23, 2021
1 parent 0bf403a commit 47916b8
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tools/clang-format.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down

0 comments on commit 47916b8

Please sign in to comment.