fix: help and errors name sharing.key and sharing.keyRules, not share.* (#64)

Co-authored-by: Karl-Einar Bergstrøm <karl-einarb@outlook.com>
This commit was merged in pull request #64.
This commit is contained in:
keb authored and Karl-Einar Bergstrøm committed 2026-10-13 22:57:49 +02:00
1 parent 5cf9ecc0e2
commit 6b3edd45d8
9 files changed
+17 -17

No files matched your search

+1 -1
View File
@@ -53,7 +53,7 @@ func (r Rules) Check(key []byte) error {
if len(has) == 0 {
return nil
}
return fmt.Errorf("its value has %s; share.keyRules needs %s",
return fmt.Errorf("its value has %s; sharing.keyRules needs %s",
strings.Join(has, " and "), strings.Join(needs, " and "))
}
+3 -3
View File
@@ -259,8 +259,8 @@ func CheckPath(p string) error {
return nil
}
// DefaultKey is the key for a repo's files: share.key in the repo's
// .lazysecrets.yaml, else general (share.key in the config). ok is false
// DefaultKey is the key for a repo's files: sharing.key in the repo's
// .lazysecrets.yaml, else general (sharing.key in the config). ok is false
// when neither names one.
func DefaultKey(root, general string) (key ref.Ref, ok bool, err error) {
link, err := repo.ShareKey(root)
@@ -276,7 +276,7 @@ func DefaultKey(root, general string) (key ref.Ref, ok bool, err error) {
}
key, err = ParseKey(link)
if err != nil {
return ref.Ref{}, false, fmt.Errorf("share.key in %s: %w", where, err)
return ref.Ref{}, false, fmt.Errorf("sharing.key in %s: %w", where, err)
}
return key, true, nil
}