clan-cli/secrets: update some error message in encrypt_secret (#5271)

Found that while reading through some code.

Co-authored-by: Jörg Thalheim <joerg@thalheim.io>
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/5271
Co-authored-by: Louis Opter <louis@opter.org>
Co-committed-by: Louis Opter <louis@opter.org>
This commit is contained in:
Louis Opter
2025-10-08 07:41:14 +00:00
committed by DavHau
parent 94df3855b5
commit a06a7a7a2c

View File

@@ -158,8 +158,10 @@ def encrypt_secret(
admin_keys = sops.ensure_admin_public_keys(flake_dir)
if not admin_keys:
# TODO double check the correct command to run
msg = "No keys found. Please run 'clan secrets add-key' to add a key."
msg = (
"No admin keys found.\n\n"
"Please run 'clan vars keygen' to generate and set up keys."
)
raise ClanError(msg)
username = next(iter(admin_keys)).username