disable interactive prompts and log configuration errors during automated prelaunch or injection sequences
This commit is contained in:
parent
869c2927d3
commit
58508465c7
1 changed files with 9 additions and 1 deletions
10
wrapper.py
10
wrapper.py
|
|
@ -439,9 +439,17 @@ def main():
|
||||||
print(f"Warning: Could not save updated config: {e}")
|
print(f"Warning: Could not save updated config: {e}")
|
||||||
|
|
||||||
# Retrieve Secret (Keyring refactor)
|
# 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 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.")
|
print("Error: No secret available.")
|
||||||
sys.exit(1)
|
sys.exit(1)
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue