From 03d7362fc8e4f97fbd78f5e71d9943029a943650 Mon Sep 17 00:00:00 2001 From: Igor Soarez Date: Wed, 18 Nov 2026 19:45:20 +0000 Subject: szecret: /usr/local/bin on PATH for the age plugins, which launchd's PATH lacks; enrol --se makes an age1tag1 key, which age encrypts to natively --- secrets/common.sh | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'secrets/common.sh') diff --git a/secrets/common.sh b/secrets/common.sh index b839cef..13fe749 100644 --- a/secrets/common.sh +++ b/secrets/common.sh @@ -183,6 +183,11 @@ get_local_private_key() { exists() { command -v "$1" >/dev/null 2>&1; } # Check if command exists (is in path). pathadd() { [[ -d "$1" ]] && PATH="$1"$(echo ":$PATH:" | sed "s|:$1:|:|" | sed 's|:$||'); } +# Where cloud-setup installs the age plugins (age-plugin-tpm, age-plugin-se), +# which age finds on PATH; launchd's default PATH leaves it out. +if [[ ":${PATH}:" != *":/usr/local/bin:"* ]]; then + pathadd /usr/local/bin || true +fi ensure_age() { if exists age ; then -- cgit v1.2.3