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

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

Open
quite opened this issue Oct 29, 2024 · 4 comments

Comments

@quite
Copy link
Contributor

quite commented Oct 29, 2024

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

  • OS: Arch Linux
  • OS version: Linux kiwi 6.10.5-arch1-1 # 1 SMP PREEMPT_DYNAMIC Thu, 15 Aug 2024 00:25:30 +0000 x86_64 GNU/Linux
  • gopass Version: 1.15.14
  • Installation method: Arch Linux package

Additional context

@Denis-Kuso
Copy link

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

@quite
Copy link
Contributor Author

quite commented Nov 12, 2024

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
Copy link

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

@quite
Copy link
Contributor Author

quite commented Nov 12, 2024

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants