vaticle / typedb-console

TypeDB Console: CLI for TypeDB and TypeDB Cluster
https://typedb.com
Mozilla Public License 2.0
7 stars 16 forks source link

Uncaught exception with Ctrl+C instead of input on password update #218

Open izmalk opened 7 months ago

izmalk commented 7 months ago

Description

user password-update command requests the old password. Shows an exception when I use Ctrl+C instead of input.

Environment

  1. OS (where TypeDB server runs): macOS 13.4.1 (c) (22F770820d)
  2. TypeDB version (and platform): 2.25.7 (x86)
  3. TypeDB client: Console 2.25.7
  4. Other environment details:

Reproducible Steps

Steps to create the smallest reproducible scenario:

  1. Start TypeDB Console (I used TypeDB Core and its Console)
  2. Use command user password-update
  3. Use Ctrl + C

Expected Output

Graceful exit.

Actual Output

> user password-update
Old password:
Exception in thread "main" org.jline.reader.UserInterruptException
    at org.jline.reader.impl.LineReaderImpl.readLine(LineReaderImpl.java:707)
    at org.jline.reader.impl.LineReaderImpl.readLine(LineReaderImpl.java:498)
    at org.jline.reader.impl.LineReaderImpl.readLine(LineReaderImpl.java:471)
    at com.vaticle.typedb.console.common.Utils.readPassword(Utils.java:76)
    at com.vaticle.typedb.console.command.REPLCommand.readREPLCommand(REPLCommand.java:767)
    at com.vaticle.typedb.console.command.REPLCommand.readREPLCommand(REPLCommand.java:740)
    at com.vaticle.typedb.console.TypeDBConsole.runREPLMode(TypeDBConsole.java:183)
    at com.vaticle.typedb.console.TypeDBConsole.main(TypeDBConsole.java:128)

Additional information