Closed MorphBonehunter closed 8 months ago
@MorphBonehunter Don't apologize. You’re providing excellent bug reports on a very subtle chain of interactions.
+1 thank you @MorphBonehunter for your work here. Every problem that you report now is one less problem that thousands of chezmoi users will not encounter in the future. If you, as a highly-technical user, didn't report these problems early then we would be swamped with support requests from the wider user base later and would probably burn out. By reporting problems early, you are actually saving us :)
On this specific issue, it's very clearly a bug in chezmoi's current implementation. Specifically, chezmoi's interaction with keepassxc-cli
currently assumes that the keepassxc.database
exists. Of course, this is not a correct assumption, and there are a bunch of other problems that also might occur (e.g. the user does not enter the correct database password on their first try, an important process is killed, etc. etc.). All of these lead to keepassxc-cli
not giving the prompt that chezmoi currently expects.
I suspect that the robust solution to this is to add a timeout to chezmoi's interaction with keepassxc-cli open
.
My cautious attitude comes from bad experiences with other projects, where it was obviously a burden when new issues/requests were opened. So I'm always a bit cautious with new projects... 😄
Describe the bug
First and foremost...sorry to annoy you again with another keepass issue.
During testing for issue #3482 i had an typo in my Keepass password. While in non open mode chezmoi give me an error about this like
in open mode chezmoi hangs after entering the wrong password. The process list shows an defunct keepassxc-cli process:
This behavior could also seen if the database specified in the config doesn't exist. Chezmoi doctor detects that this file does not exist
also doesn't prompt for a password (that's different from the non open mode which still ask for a password) but calls then keepassxc-cli which errored and hangs.
To reproduce
Configure an non exiting database in chezmoi config, generate a template with an keepass function and try to apply this.
Expected behavior
chezmoi exits with an error.
Output of command with the
--verbose
flagThere ist no output after entering the password (in case of wong password), no output at all with not existing database.
Output of
chezmoi doctor