From 131c44536c83c01097de9253f7b09bdd7f2c2b4c Mon Sep 17 00:00:00 2001
From: Tristan Partin <tristan@neon.tech>
Date: Mon, 18 Dec 2023 15:14:56 -0600
Subject: [PATCH v5 2/2] Print all diffs with pgindent --check

Previously, only one diff was printed if multiple files were out of
compliance.
---
 src/tools/pgindent/pgindent | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/src/tools/pgindent/pgindent b/src/tools/pgindent/pgindent
index eb2f52f4b9..0ae4dcddb1 100755
--- a/src/tools/pgindent/pgindent
+++ b/src/tools/pgindent/pgindent
@@ -372,6 +372,7 @@ warn "No files to process" unless @files;
 process_exclude();
 
 my %processed;
+my $status = 0;
 
 foreach my $source_filename (@files)
 {
@@ -427,10 +428,10 @@ foreach my $source_filename (@files)
 
 			if ($check)
 			{
-				exit 2;
+				$status = 2;
 			}
 		}
 	}
 }
 
-exit 0;
+exit $status;
-- 
Tristan Partin
Neon (https://neon.tech)

