summaryrefslogtreecommitdiff
path: root/secrets/common.sh
diff options
context:
space:
mode:
authorIgor Soarez <igor@soarez.org>2026-11-18 17:34:25 +0000
committerIgor Soarez <igor@soarez.org>2026-11-18 17:34:25 +0000
commit9249082857d407dde4e22e672b615631a294279e (patch)
treec5f8ce2e90b5172dbe3dab557e03d9ba6dbc4971 /secrets/common.sh
parentbb723d867c380ef56917dc4c7836d33b940c6a69 (diff)
szecret get-local/put-local: find the store's key in a bucket too, not only in the old store
Diffstat (limited to 'secrets/common.sh')
-rw-r--r--secrets/common.sh6
1 files changed, 3 insertions, 3 deletions
diff --git a/secrets/common.sh b/secrets/common.sh
index 5eee8b6..b839cef 100644
--- a/secrets/common.sh
+++ b/secrets/common.sh
@@ -164,11 +164,11 @@ local_key_name() {
ensure_local_store() {
local local_store_name="$1"
local local_key_name
- local local_key_file
local_key_name="$(local_key_name "${local_store_name}")"
- local_key_file="$(file_for "${local_key_name}")"
- if ! [[ -r "${local_key_file}" ]]; then
+ # Wherever its key is, the old store or a bucket; whether this machine can
+ # open it is get's to say.
+ if ! (find_secret "${local_key_name}" >/dev/null 2>&1); then
>&2 echo "ERROR: Local store '${local_store_name}' does not exist (key: ${local_key_name})"
exit 1
fi