From 0c6d572c11730913c8207462c5231982e6ca16cc Mon Sep 17 00:00:00 2001 From: Bruce Momjian Date: Sat, 30 Aug 2025 18:26:08 -0400 Subject: add_commit_links.pl: error out if missing major version number Reported-by: Tom Lane Author: Tom Lane Discussion: https://postgr.es/m/53125.1756591456@sss.pgh.pa.us --- src/tools/add_commit_links.pl | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src') diff --git a/src/tools/add_commit_links.pl b/src/tools/add_commit_links.pl index 710a6492032..87a6e47e6fe 100755 --- a/src/tools/add_commit_links.pl +++ b/src/tools/add_commit_links.pl @@ -50,6 +50,8 @@ sub process_file # Get major version number from the file name. $file =~ m/-(\d+)\./; my $major_version = $1; + die "file name $file is not in the expected format\n" + unless defined $major_version; open(my $fh, '<', $file) || die "could not open file $file: $!\n"; open(my $tfh, '>', $tmpfile) || die "could not open file $tmpfile: $!\n"; -- cgit v1.2.3