From 58508465c7fa98c0347412e6249f3cdfd6c8f736 Mon Sep 17 00:00:00 2001 From: cosmo Date: Sat, 18 Apr 2026 15:43:33 +0200 Subject: [PATCH] disable interactive prompts and log configuration errors during automated prelaunch or injection sequences --- wrapper.py | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/wrapper.py b/wrapper.py index e07a452..b1e8f48 100755 --- a/wrapper.py +++ b/wrapper.py @@ -439,9 +439,17 @@ def main(): print(f"Warning: Could not save updated config: {e}") # Retrieve Secret (Keyring refactor) - secret = get_secret(config, config_path) + secret = get_secret(config, config_path, allow_prompt=not (args.prelaunch or args.inject_only)) if not secret: + if args.prelaunch or args.inject_only: + error_log = os.path.join(config_dir, 'error.log') + try: + with open(error_log, 'a') as f: + f.write(f"[{time.strftime('%Y-%m-%d %H:%M:%S')}] Error: OTP secret not configured.\n") + f.write("Please run 'xivlauncher-wrapper' manually from your terminal or application menu to configure your secret before launching via Steam.\n\n") + except Exception: + pass print("Error: No secret available.") sys.exit(1)