diff --git a/llvm/utils/git/code-format-helper.py b/llvm/utils/git/code-format-helper.py index c45bb4d935d47..32745768dc74c 100644 --- a/llvm/utils/git/code-format-helper.py +++ b/llvm/utils/git/code-format-helper.py @@ -156,6 +156,8 @@ def format_run( if proc.returncode != 0: # formatting needed, or the command otherwise failed print(f"error: {self.name} exited with code {proc.returncode}") + # Print the diff in the log so that it is viewable there + print(proc.stdout.decode("utf-8")) return proc.stdout.decode("utf-8") else: sys.stdout.write(proc.stdout.decode("utf-8")) @@ -200,6 +202,8 @@ def format_run( if proc.returncode != 0: # formatting needed, or the command otherwise failed print(f"error: {self.name} exited with code {proc.returncode}") + # Print the diff in the log so that it is viewable there + print(proc.stdout.decode("utf-8")) return proc.stdout.decode("utf-8") else: sys.stdout.write(proc.stdout.decode("utf-8"))