Skip to content

Commit 12c548b

Browse files
authored
tools: fix error detection (#914)
The `ChildProces` object `result` does not have an `error` property. We should use `stderr` instead.
1 parent 458d895 commit 12c548b

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

tools/clang-format.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,8 @@ function main(args) {
2121
...filesToCheck
2222
], { encoding: 'utf-8' });
2323

24-
if (result.error) {
25-
console.error('Error running git-clang-format:', result.error);
24+
if (result.stderr) {
25+
console.error('Error running git-clang-format:', result.stderr);
2626
return 2;
2727
}
2828

0 commit comments

Comments
 (0)