Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Allow for dumb terminal when using 'hz-cli sql' with non-terminal inp…
…ut/output (#24855) Allow for a dumb terminal as a fallback if no system terminal detected in the hz-cli input or output. Fixes: https://hazelcast.atlassian.net/browse/HZ-2610 Also see: - jline/jline3#291 (comment) - jline/jline3#299 Testing: - build local docker image using script (https://hazelcast.slack.com/archives/C01MH9KF1QT/p1657111661829299): `DOCKER_TAG=test ./build-docker-image.sh` - run the container: `docker run -it --rm --name hz-test hazelcast:test` - start container shell: `docker exec -it hz-test sh` - exec hz-cli with piped input: `echo exit\n | hz-cli sql` Before: ``` $ docker exec -it hz-test sh /opt/hazelcast $ echo exit\n | hz-cli sql 10:45:18.310 [ WARN] [o.jline] Unable to create a system terminal, creating a dumb terminal (enable debug logging for more information) Connected to Hazelcast 5.3.0 at [172.17.0.2]:5701 (+0 more) Type 'help' for instructions sql> Exiting from SQL console ``` After: no jline warning ``` $ docker exec -it hz-test sh /opt/hazelcast $ echo exit\n | hz-cli sql Connected to Hazelcast 5.4.0 at [172.17.0.3]:5701 (+0 more) Type 'help' for instructions sql> Exiting from SQL console ``` Breaking changes (list specific methods/types/messages): * API * client protocol format * serialized form * snapshot format Checklist: - [x] Labels (`Team:`, `Type:`, `Source:`, `Module:`) and Milestone set - [x] Label `Add to Release Notes` or `Not Release Notes content` set - [x] Request reviewers if possible - [x] Send backports/forwardports if fix needs to be applied to past/future releases - [x] New public APIs have `@Nonnull/@Nullable` annotations - [x] New public APIs have `@since` tags in Javadoc
- Loading branch information