Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitb20fe54

Browse files
committed
Set exit status for pgindent if pg_bsd_indent fails
Also document the exit codes in the script.The new exit code is 3, and is not overridden by the exit code set in--check mode.Author: Ashutosh BapatDiscussion:https://postgr.es/m/CAExHW5sPRSiFeLdP-u1Fa5ba7YS2f0gvLjmKOobopKadJwQ_GQ@mail.gmail.com
1 parent7b27f5f commitb20fe54

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

‎src/tools/pgindent/pgindent

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,13 @@
22

33
# Copyright (c) 2021-2025, PostgreSQL Global Development Group
44

5+
# Program to maintain uniform layout style in our C code.
6+
# Exit codes:
7+
# 0 -- all OK
8+
# 1 -- error invoking pgindent, nothing done
9+
# 2 -- --check mode and at least one file requires changes
10+
# 3 -- pg_bsd_indent failed on at least one file
11+
512
use strict;
613
use warningsFATAL=>'all';
714

@@ -408,6 +415,7 @@ foreach my $source_filename (@files)
408415
if ($sourceeq"")
409416
{
410417
printSTDERR"Failure in$source_filename:" .$error_message ."\n";
418+
$status = 3;
411419
next;
412420
}
413421

@@ -428,7 +436,7 @@ foreach my $source_filename (@files)
428436

429437
if ($check)
430438
{
431-
$status = 2;
439+
$status||= 2;
432440
lastunless$diff;
433441
}
434442
}

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp