Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CASSANDRA-15623: cqlsh return non-zero status when STDIN CQL fails #468

Closed
wants to merge 1 commit into from

Conversation

plastikat
Copy link
Contributor

I believe currently it can be safely assumed that
any Shell instance without a TTY (i.e. Shell.tty == False) is in a "batch mode". With this in mind,
the two following changes were applied.

First, while we could just use the Shell.tty
attribute directly, to be semantically clear and to
provide room for future enhancement on what is
considered a "batch mode", we will add a respective
property instead.

Second, with the new Shell.batch_mode property at
hand, it makes no more sense to check any options
implying a "batch mode", it is perfectly enough to
just check this property.

patch by Jacob Becker a.k.a. plastikat;
reviewed by Jordan West for CASSANDRA-15623

I believe currently it can be safely assumed that
any `Shell` instance without a TTY (i.e. `Shell.tty
== False`) is in a "batch mode". With this in mind,
the two following changes were applied.

First, while we could just use the `Shell.tty`
attribute directly, to be semantically clear and to
provide room for future enhancement on what is
considered a "batch mode", we will add a respective
property instead.

Second, with the new `Shell.batch_mode` property at
hand, it makes no more sense to check any options
implying a "batch mode", it is perfectly enough to
just check this property.

patch by Jacob Becker a.k.a. plastikat;
reviewed by Jordan West for CASSANDRA-15623
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants