secrets: improve error message on wrong age key format

This commit is contained in:
DavHau
2024-12-04 12:00:06 +07:00
parent 84ed44309e
commit ae24672c54

View File

@@ -28,7 +28,7 @@ def public_or_private_age_key_type(arg_value: str) -> str:
return line.strip()
if line.startswith("AGE-SECRET-KEY-"):
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)