Closed sm1999 closed 2 years ago
I tried to reproduce this in #1970 which includes :=:
in the Notes:
field. This test passes on all platforms. What is the full contents of the Notes:
field? Could it be something else?
Thank you for your prompt reply!
Contain of the Notes field
account: 123456789
2021-11-27 [expires: 2023-02-25]
main = false
Output of command
❯ chezmoi --verbose execute-template '{{ (keepassxc "test").Password }}'
Insert password to unlock /home/sm1999/test.kdbx:
Enter password to unlock /home/sm1999/test.kdbx:
chezmoi: template: arg1:1:4: executing "arg1" at <keepassxc "test">: error calling keepassxc: keepassxc-cli show --show-protected /home/sm1999/test.kdbx test: main = false: parse error
Title: test
UserName: test
Password: test
URL:
Notes: account: 123456789
2021-11-27 [expires: 2023-02-25]
main = false
I tried to reproduce it in the dev environment locally referencing #1970 but was not successful to reproduce the error.
Thanks for the extra details. I see where the problem is: the characters before expires:
are confusing chezmoi. This is definitely a bug. Fix coming later today.
Thank you for this amazing program! Really made dotfiles managing a lot easier.
One more thing, can you pass --quiet
flag to keepassxc-cli
. so that these duplicate lines do not occur
❯ chezmoi --verbose execute-template '{{ (keepassxc "test").Password }}'
Insert password to unlock /home/sm1999/test.kdbx:
Enter password to unlock /home/sm1999/test.kdbx:
One more thing, can you pass
--quiet
flag tokeepassxc-cli
. so that these duplicate lines do not occur
Please open a new issue for this. Adding new issues to existing issues makes it hard to track and untangle them.
Fixed with #1970.
Describe the bug
If notes field in keepassxc password contains
:=:
. chezmoi throws parse error and show all the output of keepassxc show command. It's a bit flaky, sometimes it doesn't throw error.To reproduce
Steps to reproduce the behavior.
:=:
in notes field of keepassxc entry.chezmoi execute-template '{{ (keepassxc "test").Password }}'
Expected behavior
A clear and concise description of what you expected to happen.
chezmoi should not throw the parse error
Output of command with the
--verbose
flagOutput of
chezmoi doctor
Additional context
I tried to minimize my note to find the pattern and settled on
:=:
. Also happens on Linux.