You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
But I'm not sure I understand what it's supposed to do and how it works, so maybe that's expected on a local dev branch and should only be correct in releases?
Steps To Reproduce
export GOPASS_HOMEDIR=/tmp/gopasstest
export GOPASS_DEBUG_LOG=init.log
gopass init --crypto age test
<should crash because test is not a good key>
cat init.log | grep backend
This should contain the following logs roughly
2024/10/02 21:15:02.558600 leaf/store.go:52 leaf.New Instantiating "" at "/tmp/gopasstest3/.local/share/gopass/stores/root"
2024/10/02 21:15:02.558608 backend/storage.go:66 backend.DetectStorage Failed to use requested gitfs for /tmp/gopasstest3/.local/share/gopass/stores/root: git repo does not exist at /tmp/gopasstest3/.local/share/gopass/stores/root/.git
2024/10/02 21:15:02.558614 backend/storage.go:73 backend.DetectStorage Using fallback "fs" for "/tmp/gopasstest3/.local/share/gopass/stores/root"
2024/10/02 21:15:02.558654 debug/version.go:34 debug.ModuleVersion no module github.com/gopasspw/gopass/internal/backend/fs found
2024/10/02 21:15:02.558659 fs/loader.go:29 fs.loader.New Using Storage Backend: fs(0.0.0,path:/tmp/gopasstest3/.local/share/gopass/stores/root)
2024/10/02 21:15:02.558682 debug/version.go:34 debug.ModuleVersion no module github.com/gopasspw/gopass/internal/backend/fs found
2024/10/02 21:15:02.558664 leaf/store.go:64 leaf.New Storage for => /tmp/gopasstest3/.local/share/gopass/stores/root initialized as fs(0.0.0,path:/tmp/gopasstest3/.local/share/gopass/stores/root)
2024/10/02 21:15:02.558690 age/loader.go:23 age.loader.New Using Crypto Backend: age
Expected behavior
I expect not to see the lines about
debug.ModuleVersion no module github.com/gopasspw/gopass/internal/backend/fs found
But when I try to correct the code to use github.com/gopasspw/gopass/internal/backend/storage/fs instead, which seems to exist:
return debug.ModuleVersion("github.com/gopasspw/gopass/internal/backend/fs") is almost certainly wrong. But I wonder why it doesn't work with the correct module. Maybe it never properly worked ...
Summary
It seems we might be invoking the
debug.ModuleVersion
function on a wrong backend here:gopass/internal/backend/storage/fs/store.go
Lines 232 to 235 in 946ccf4
But I'm not sure I understand what it's supposed to do and how it works, so maybe that's expected on a local dev branch and should only be correct in releases?
Steps To Reproduce
This should contain the following logs roughly
Expected behavior
I expect not to see the lines about
But when I try to correct the code to use
github.com/gopasspw/gopass/internal/backend/storage/fs
instead, which seems to exist:gopass/internal/backend/storage/fs.go
Line 3 in d0be405
it also doesn't work.
Environment
The text was updated successfully, but these errors were encountered: