Re: pgindent exit status if a file encounters an error

2025-01-08 Thread Ashutosh Bapat
On Wed, Jan 8, 2025 at 9:35 PM Andrew Dunstan wrote: > > > > I forget now what I was intending here, so I have committed this with minor > tweaks. > > Thanks Andrew for taking care of this. -- Best Wishes, Ashutosh Bapat

Re: pgindent exit status if a file encounters an error

2025-01-08 Thread Andrew Dunstan
On 2024-06-28 Fr 8:35 AM, Ashutosh Bapat wrote: 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

Re: pgindent exit status if a file encounters an error

2024-11-26 Thread Andrew Dunstan
On 2024-10-16 We 7:26 PM, Bruce Momjian wrote: Uh, where are we on this? It slipped under my radar - I have put it back :-) cheers andrew -- Andrew Dunstan EDB:https://www.enterprisedb.com

Re: pgindent exit status if a file encounters an error

2024-10-16 Thread Bruce Momjian
Uh, where are we on this? --- On Fri, Jun 28, 2024 at 06:05:35PM +0530, Ashutosh Bapat wrote: > > > On Wed, Jun 26, 2024 at 8:54 PM Tom Lane wrote: > > Ashutosh Bapat writes: > > The usage help mentions exit co

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