Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
format.sh: Avoid exit when no files changed
This script is set to exit any time a command fails. In the case of this line, the script unexpectedly errors out on this check to see if any files have changed that are relevant for the `clang-format` tool. The `grep` specifically will return non-zero in this case. The workaround here is to catch the error and run `echo -e` instead, which we know will succeed and the end result is what we want (the list of changed files will be empty). This allows the script to continue to completion, even when `clang-format` has nothing to do. Signed-off-by: Russell Bryant <[email protected]>
- Loading branch information