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

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

Closed
mikera opened this issue Sep 19, 2024 · 1 comment
Closed
Labels
theme: integration An issue or change related to integration with other frameworks, shells or operating systems theme: shell An issue or change related to interactive (JLine) applications

Comments

@mikera
Copy link

mikera commented Sep 19, 2024

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.

@remkop
Copy link
Owner

remkop commented Jan 6, 2025

Hi @mikera apologies for the late reply.
Unfortunately I don't see anything that the picocli library can do to help with this.
This seems to be an interaction between Powershell and the Java Console::readPassword API.
Perhaps it is better to file this issue with Oracle or Microsoft.

@remkop remkop closed this as not planned Won't fix, can't repro, duplicate, stale Jan 6, 2025
@remkop remkop added theme: shell An issue or change related to interactive (JLine) applications theme: integration An issue or change related to integration with other frameworks, shells or operating systems labels Jan 6, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
theme: integration An issue or change related to integration with other frameworks, shells or operating systems theme: shell An issue or change related to interactive (JLine) applications
Projects
None yet
Development

No branches or pull requests

2 participants