diff --git a/ament_clang_tidy/ament_clang_tidy/main.py b/ament_clang_tidy/ament_clang_tidy/main.py index 6745d8d6..96bf0ca6 100755 --- a/ament_clang_tidy/ament_clang_tidy/main.py +++ b/ament_clang_tidy/ament_clang_tidy/main.py @@ -171,6 +171,9 @@ def start_subprocess(full_cmd): print('The invocation of "%s" failed with error code %d: %s' % (os.path.basename(clang_tidy_bin), e.returncode, e), file=sys.stderr) + # Attempt to recover output, if any was found (eg - if + # WarningsAsErrors was specified in the config file). + output = e.output.decode('utf-8') return output files = []