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)