fix: help and errors name sharing.key and sharing.keyRules, not share.*
CI / Checks (pull_request) Successful in 42s
PR title / Conventional title (pull_request) Successful in 1s

This commit is contained in:
keb committed 2026-10-13 20:57:08 +02:00
1 parent 5cf9ecc0e2
commit fb6289b159
9 files changed
+17 -17

No files matched your search

+3 -3
View File
@@ -84,7 +84,7 @@ type Options struct {
// CacheFile keeps what was loaded between runs; "" keeps it for this
// run only.
CacheFile string
// ShareKey is the config's share.key: the secret that encrypts shared
// ShareKey is the config's sharing.key: the secret that encrypts shared
// env files, for repos whose .lazysecrets.yaml names none.
ShareKey string
// ShareRules are what a key's value must be to share with it.
@@ -281,8 +281,8 @@ type Model struct {
linked []provider.Container // vaults opened from links, this session
open *ref.Ref // reference to open at startup
shareKey string // the config's share.key
shareRules share.Rules // and share.keyRules
shareKey string // the config's sharing.key
shareRules share.Rules // and sharing.keyRules
// A lazysecrets:// link found on the clipboard, offered in the footer.
dismissedLink string // the last link offered: not offered again
+1 -1
View File
@@ -38,7 +38,7 @@ type shareFilesMsg struct {
type sealedMsg struct {
link ref.Ref
n int
// from is the picker the key was picked in; nil for share.key's.
// from is the picker the key was picked in; nil for sharing.key's.
from *picker
err error
}
+2 -2
View File
@@ -50,7 +50,7 @@ func shareFrom(t *testing.T, root string, paste bool) string {
t.Fatalf("selected %v, want the repo", src.ID)
}
d.keys("S", "f")
// No share.key set: it asks which secret, in Go to, which lists
// No sharing.key set: it asks which secret, in Go to, which lists
// only secrets.
v := d.m.search
if v == nil || v.picker == nil {
@@ -218,7 +218,7 @@ func TestShareInDemo(t *testing.T) {
}
// Too short a key: the picker stays, saying why.
d.send(tea.PasteMsg{Content: "https://kv-app-prod.vault.azure.net/secrets/db-password"})
if d.m.search == nil || !strings.Contains(d.m.search.picker.err, "Can't use db-password: its value has 28 characters; share.keyRules needs 32 (minLength)") {
if d.m.search == nil || !strings.Contains(d.m.search.picker.err, "Can't use db-password: its value has 28 characters; sharing.keyRules needs 32 (minLength)") {
t.Fatalf("not said in the picker: %v\n%s", d.m.search != nil, d.screen())
}
if !strings.Contains(d.screen(), "28 characters") {