remkop / picocli

Picocli is a modern framework for building powerful, user-friendly, GraalVM-enabled command line apps with ease. It supports colors, autocompletion, subcommands, and more. In 1 source file so apps can include as source & avoid adding a dependency. Written in Java, usable from Groovy, Kotlin, Scala, etc.
https://picocli.info
Apache License 2.0
4.93k stars 424 forks source link

Potential issue reading passwords in Windows - this stops CTRL-C from working? #2339

Open mikera opened 2 months ago

mikera commented 2 months ago

Hi, thanks for all the great work on picocli, using it with great success!

One thing that appears to be an issue (but perhaps my ignorance?) is when trying to get a user to input a password:

Console c = System.console();
char[] pass= c.readPassword("Password prompt");

This works fine, but subsequently CTRL-C no longer seems to work to terminate the picocli CLI process (Windows with Powershell 7.4.5). Without doing any such prompt CTRL-C terminates the process as expected.