dbcli / pgcli

Postgres CLI with autocompletion and syntax highlighting
http://pgcli.com
BSD 3-Clause "New" or "Revised" License
12.08k stars 557 forks source link

y is not a valid boolean error is displayed sometimes when acknowledging a destructive command #932

Closed butla closed 1 year ago

butla commented 6 years ago

Description

Today I noticed that sometimes when I run "destructive" commands and I answer with "y" I see an error, that still doesn't seem to affect the functionality. It's a bit off-putting, though, especially when I run some important stuff. And example:

XXX@Y:ZZZ> alter table bla1 ADD CONSTRAINT bla1_id_unique UNIQUE(id);
               alter table bla2 ADD CONSTRAINT bla2_id_unique UNIQUE(id);
You're about to run a destructive command.
Do you want to proceed? (y/n): y
Error: y is not a valid boolean

It seems to not happend when I provide only one command.

Your environment

dbaty commented 1 year ago

I cannot reproduce this issue with the latest version (3.5.0). I suppose that it has been fixed. Shall we close this issue?

Repro ``` pgcli-dev> create table bla1 (id int) CREATE TABLE pgcli-dev> create table bla2 (id int) CREATE TABLE pgcli-dev> alter table bla1 ADD CONSTRAINT bla1_id_unique UNIQUE(id); alter table bla2 ADD CONSTRAINT bla2_id_unique UNIQUE(id); You're about to run a destructive command. Do you want to proceed? (y/n): y Your call! ALTER TABLE ALTER TABLE pgcli-dev> \d bla1 +--------+---------+-----------+ | Column | Type | Modifiers | |--------+---------+-----------| | id | integer | | +--------+---------+-----------+ Indexes: "bla1_id_unique" UNIQUE CONSTRAINT, btree (id) pgcli-dev> \d bla2 +--------+---------+-----------+ | Column | Type | Modifiers | |--------+---------+-----------| | id | integer | | +--------+---------+-----------+ Indexes: "bla2_id_unique" UNIQUE CONSTRAINT, btree (id) ```
j-bennet commented 1 year ago

Closed as completed.