Merge pull request #13 from overcuriousity/claude/fix-setup-wizard-display-IroVi

Always prompt for GPG key selection for transparency
This commit is contained in:
overcuriousity
2025-12-14 13:50:20 +01:00
committed by GitHub

View File

@@ -76,27 +76,23 @@ def run_gpg_wizard():
# Let user select a key # Let user select a key
selected_key = None selected_key = None
if len(keys) == 1: while True:
print(f"Only one key found. Using: {keys[0][1]}") try:
selected_key = keys[0][0] choice = input(f"Select a key (1-{len(keys)}, or 0 to use default key): ").strip()
else: choice_num = int(choice)
while True:
try:
choice = input(f"Select a key (1-{len(keys)}, or 0 to use default key): ").strip()
choice_num = int(choice)
if choice_num == 0: if choice_num == 0:
print("Using GPG default key (no specific key ID)") print("Using GPG default key (no specific key ID)")
selected_key = None selected_key = None
break break
elif 1 <= choice_num <= len(keys): elif 1 <= choice_num <= len(keys):
selected_key = keys[choice_num - 1][0] selected_key = keys[choice_num - 1][0]
print(f"Selected: {keys[choice_num - 1][1]}") print(f"Selected: {keys[choice_num - 1][1]}")
break break
else: else:
print(f"Please enter a number between 0 and {len(keys)}") print(f"Please enter a number between 0 and {len(keys)}")
except ValueError: except ValueError:
print("Please enter a valid number") print("Please enter a valid number")
print("\n✓ GPG signing enabled!") print("\n✓ GPG signing enabled!")
if selected_key: if selected_key: