cli: avoid fingerprint prompt when option provided

This commit is contained in:
thePR0M3TH3AN
2025-07-11 14:19:16 -04:00
parent e5de6c885e
commit afefb5415b
3 changed files with 26 additions and 14 deletions

View File

@@ -51,9 +51,10 @@ def start_server(fingerprint: str | None = None) -> str:
Optional seed profile fingerprint to select before starting the server.
"""
global _pm, _token
_pm = PasswordManager()
if fingerprint:
_pm.select_fingerprint(fingerprint)
if fingerprint is None:
_pm = PasswordManager()
else:
_pm = PasswordManager(fingerprint=fingerprint)
_token = secrets.token_urlsafe(16)
print(f"API token: {_token}")
origins = [