Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Idea: config: [mounts] path should be set using ~ if GOPASS_HOMEDIR set. #2897

Open
maxwowpow opened this issue Jun 2, 2024 · 1 comment
Labels
bug Defects help-wanted windows Affects Windows (only)
Milestone

Comments

@maxwowpow
Copy link

maxwowpow commented Jun 2, 2024

Summary

the config file has absolute path of stores like /.../.local/share/gopass/stores/root

using custom sync software leads to path inconsistencies, e.g. mac vs windows.

Steps To Reproduce

create a store under windows, copy folder to mac, set GOPASS_HOMEDIR try gopass ls

Expected behavior

the env var GOPASS_HOMEDIR should somehow be respected, but [mounts] path in config takes precedence.

Environment

macos 14.5 / brew
gopass 1.15.13 go1.22.2 darwin arm64

Additional context

if there is no value for [mounts] path in config, the GOPASS_HOMEDIR is respected and everything works, but first call to e.g. gopass ls recreates the path entry, which breaks crossplatform execution.

@maxwowpow maxwowpow changed the title .config [mounts] path absolute path .config [mounts] path absolute path takes precedence over GOPASS_HOMEDIR and breaks cross platform execution Jun 2, 2024
@maxwowpow maxwowpow changed the title .config [mounts] path absolute path takes precedence over GOPASS_HOMEDIR and breaks cross platform execution .config [mounts] path takes precedence over GOPASS_HOMEDIR and breaks cross platform execution Jun 2, 2024
@maxwowpow maxwowpow changed the title .config [mounts] path takes precedence over GOPASS_HOMEDIR and breaks cross platform execution config: [mounts] path takes precedence over GOPASS_HOMEDIR and breaks cross platform execution Jun 2, 2024
@maxwowpow
Copy link
Author

maxwowpow commented Jun 2, 2024

if the GOPASS_HOMEDIR is e.g.
/Users/user/gopass
then with double slash in config

[mounts]
	path = ~//.local/share/gopass/stores/root

it actually works.

however specifying path = ~/.local...
will create /Users/user/gopass.local/....

which seems not exactly the desired/expected behavior?

PS: it doesn't matter if the GOPASS_HOMEDIR has a trailing slash or not.

@maxwowpow maxwowpow changed the title config: [mounts] path takes precedence over GOPASS_HOMEDIR and breaks cross platform execution Idea: config: [mounts] path should be set using ~ if GOPASS_HOMEDIR set. Jun 2, 2024
@dominikschulz dominikschulz added help-wanted windows Affects Windows (only) bug Defects labels Jul 20, 2024
@dominikschulz dominikschulz added this to the 1.x.x milestone Jul 20, 2024
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
bug Defects help-wanted windows Affects Windows (only)
Projects
None yet
Development

No branches or pull requests

2 participants