secrets: improve error message on wrong age key format

This commit is contained in:
DavHau
2024-12-04 12:00:06 +07:00
parent f034921057
commit 4e4724f766

View File

@@ -28,7 +28,7 @@ def public_or_private_age_key_type(arg_value: str) -> str:
return line.strip() return line.strip()
if line.startswith("AGE-SECRET-KEY-"): if line.startswith("AGE-SECRET-KEY-"):
return get_public_age_key(line) return get_public_age_key(line)
msg = f"Please provide an age key starting with age1 or AGE-SECRET-KEY-, got: '{arg_value}'" msg = f"Please provide an age public key starting with age1 or an age private key AGE-SECRET-KEY-, got: '{arg_value}'"
raise ClanError(msg) raise ClanError(msg)