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

Cannot remove uninitialised mount #1746

Closed
rantoniuk opened this issue Jan 21, 2021 · 4 comments · Fixed by #1748
Closed

Cannot remove uninitialised mount #1746

rantoniuk opened this issue Jan 21, 2021 · 4 comments · Fixed by #1748
Assignees
Labels
bug Defects
Milestone

Comments

@rantoniuk
Copy link

rantoniuk commented Jan 21, 2021

When you have the config below (my + root) but you delete the "my" store manually, you are stuck when trying to do gopass mounts rm my because it complains my is uninitialised.
workaround:

gopass init --store my --path /Users/warden/.local/share/gopass/stores/my
gopass mounts unmount my
rm -rf /Users/username/.local/share/gopass/stores/my
$ gopass config
autoclip: false
autoimport: true
cliptimeout: 45
exportkeys: true
nocolor: false
nopager: false
notifications: true
parsing: true
path: /Users/warden/.local/share/gopass/stores/root
safecontent: false
mount 'my' => '/Users/warden/.local/share/gopass/stores/my'

$ gopass version
gopass 1.11.0 go1.15.6 darwin amd64
<root>     - gpg 2.2.27 - git 2.24.0
Available Crypto Backends: age, gpgcli, plain
Available Storage Backends: fs, gitfs, ondisk

dominikschulz added a commit to dominikschulz/gopass that referenced this issue Jan 22, 2021
Previously we were overly finicky when removing mounts.
If a mount isn't mounted or initialized we shouldn't care.
If it's in the config remove it, if not don't.

Fixes gopasspw#1746

Signed-off-by: Dominik Schulz <dominik.schulz@gauner.org>
@dominikschulz
Copy link
Member

My workaround would be to edit the config manually. But you're right: this should be fixed.

@dominikschulz dominikschulz added this to the 1.12.0 milestone Jan 22, 2021
@dominikschulz dominikschulz added the bug Defects label Jan 22, 2021
@dominikschulz dominikschulz self-assigned this Jan 22, 2021
dominikschulz added a commit to dominikschulz/gopass that referenced this issue Jan 22, 2021
Previously we were overly finicky when removing mounts.
If a mount isn't mounted or initialized we shouldn't care.
If it's in the config remove it, if not don't.

Fixes gopasspw#1746

Signed-off-by: Dominik Schulz <dominik.schulz@gauner.org>
dominikschulz added a commit to dominikschulz/gopass that referenced this issue Jan 22, 2021
Previously we were overly finicky when removing mounts.
If a mount isn't mounted or initialized we shouldn't care.
If it's in the config remove it, if not don't.

Fixes gopasspw#1746

RELEASE_NOTES=[BUGFIX] Always allow removing mounts

Signed-off-by: Dominik Schulz <dominik.schulz@gauner.org>
dominikschulz added a commit that referenced this issue Jan 22, 2021
Previously we were overly finicky when removing mounts.
If a mount isn't mounted or initialized we shouldn't care.
If it's in the config remove it, if not don't.

Fixes #1746

RELEASE_NOTES=[BUGFIX] Always allow removing mounts

Signed-off-by: Dominik Schulz <dominik.schulz@gauner.org>
@risturiz
Copy link

Hi, what about:

gopass init --store --hola

mount '--hola' => '/home/pelox/.local/share/gopass/stores/--hola'

gopass mounts remove --hola
Incorrect Usage: flag provided but not defined: -hola

This commit is related?
Thanks.

@dominikschulz
Copy link
Member

I don't think we explicitly want to support stores prefixed with dashes that make them look like flags, but if you properly escape it, this should work.

kpitt pushed a commit to kpitt/gopass that referenced this issue Jul 21, 2022
Previously we were overly finicky when removing mounts.
If a mount isn't mounted or initialized we shouldn't care.
If it's in the config remove it, if not don't.

Fixes gopasspw#1746

RELEASE_NOTES=[BUGFIX] Always allow removing mounts

Signed-off-by: Dominik Schulz <dominik.schulz@gauner.org>
@pmoros
Copy link

pmoros commented May 3, 2023

gopass mounts remove my_mount did the trick removing that initialized mount! It trows an error, but still deletes the mount.

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

Successfully merging a pull request may close this issue.

4 participants