Skip to content

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

Closed

Description

@maxwowpow

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.

Activity

  1. changed the title [-].config [mounts] path absolute path[/-] [+].config [mounts] path absolute path takes precedence over GOPASS_HOMEDIR and breaks cross platform execution[/+] on Jun 2, 2024
  2. 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[/+] on Jun 2, 2024
  3. 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[/+] on Jun 2, 2024
  4. maxwowpow commented on Jun 2, 2024

    @maxwowpow
    Author

    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.

  5. 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.[/+] on Jun 2, 2024
  6. added this to the 1.x.x milestone on Jul 20, 2024
  7. added 2 commits that reference this issue on May 24, 2026
    1c20253
    e1ab476
  8. added 3 commits that reference this issue on May 25, 2026
    a9456db
    ef080c4
    09ea770
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

    ⌂ 换网址