gopasspw / gopass

The slightly more awesome standard unix password manager for teams
https://www.gopass.pw/
MIT License
5.93k stars 497 forks source link

mounts.path containing ~ (tilde) results in gopass git ls-files fails; expansion needed #2982

Open quite opened 2 weeks ago

quite commented 2 weeks ago

Summary

If mounts.path contains a path beginning with tilde, then gopass git ls-files fails because it gets passed the tilde without it being first expanded.

Steps To Reproduce

If .config/gopass/config contains:

[mounts]
    path = ~/.password-store

Then gopass git ls-files says:

⚠ Running 'git ls-files' in ~/.password-store...
2024/10/29 15:33:36 chdir ~/.password-store: no such file or directory

Expected behavior

The tilde needs to be expanded before git ls-files is fed with the path.

Note that there may be other commands which is fed with the raw path, but where the tilde needs to be expanded first.

Environment

Additional context

Denis-Kuso commented 6 days ago

Hi. Is any help required for this issue? If so, can I try?

quite commented 6 days ago

What's needed is to dig into the code for the gopass git subcommand, and make sure that the store path that it uses gets tilde-expanded. And there may be other subcommands which needs this treatment. Please help out if you can, I don't have time.

Denis-Kuso commented 5 days ago

No problem, I'll have a go. Can you please assign me to this issue? Thank you.

quite commented 5 days ago

No, I don't have permission to do that. I suggest you just work on a solution and submit a patch. :green_heart: