Re: pgindent exit status if a file encounters an error

2024-06-28 Thread Ashutosh Bapat
On Wed, Jun 26, 2024 at 8:54 PM Tom Lane wrote: > Ashutosh Bapat writes: > > The usage help mentions exit code 2 specifically while describing --check > > option but it doesn't mention exit code 1. Neither does the README. So I > > don't think we need to document exit code 3 anywhere. Please let

Re: pgindent exit status if a file encounters an error

2024-06-26 Thread Tom Lane
Ashutosh Bapat writes: > The usage help mentions exit code 2 specifically while describing --check > option but it doesn't mention exit code 1. Neither does the README. So I > don't think we need to document exit code 3 anywhere. Please let me know if > you think otherwise. I think we should have

Re: pgindent exit status if a file encounters an error

2024-06-26 Thread Ashutosh Bapat
Hi Andrew, Thanks for the quick review. On Wed, Jun 26, 2024 at 4:53 PM Andrew Dunstan wrote: > > With --check option pgindent reports a non-zero exit code instead of > making changes. So I feel the above change should happen at least if > --check is provided. But certainly better if we do it ev

Re: pgindent exit status if a file encounters an error

2024-06-26 Thread Andrew Dunstan
On 2024-06-26 We 6:37 AM, Ashutosh Bapat wrote: Hi All, If pgindent encounters an error while applying pg_bsd_indent on a file, it reports an error to stderr but does not exit with non-zero status. $ src/tools/pgindent/pgindent . Failure in ./src/backend/optimizer/util/relnode.c: Error@2412

pgindent exit status if a file encounters an error

2024-06-26 Thread Ashutosh Bapat
Hi All, If pgindent encounters an error while applying pg_bsd_indent on a file, it reports an error to stderr but does not exit with non-zero status. $ src/tools/pgindent/pgindent . Failure in ./src/backend/optimizer/util/relnode.c: Error@2412: Stuff missing from end of file $ echo $? 0 A zero