How to auto-recover spreadsheets in Librecalc without prompting?

How do you auto answer “yes”’ to that nag restore prompt Librecalc gives you if a sreadsheet wasn’t shutdown correctly?

I have a script that auto-opens a few spreadsheets to configure my desktop after a reboot. If my computer suffers a hard-reboot or brownout, and the spreadsheets aren’t shutdown properly, Librecalc blocks all input until you answer the prompt, asking if you want to recover the spreadsheets.

The answer is always yes. Why would you answer no and lose your data?

This prompt is halting my script, which I wrote to automate my desktop setup. How do I tell it to “assume yes”? I see no relevant command line parameter.

hint: because some data may overwrite some of your pre-existing even more important data …

anywayzz, you can try to script your own cleanup :
Frequently asked question - 140 - The Document Foundation Wiki

and/or constructively join the (long standing) discussion : [META] Document recovery bugs and enhancements

So if I open a spreadsheet, it autosaves a backup file, my computer browns out, I reboot, and I reopen the spreadsheet, you’re saying it can’t just autorecover because someone somewhere entered new data (while the computer was rebooting) that might get overwritten?

Interesting theory, but I don’t see how that’s even remotely possible.

Any data entered after the autosave but before the brownout is gone. So there’s nothing to worry about overwriting, unless you’re implying the autosave files themselves are corrupt. In which case, why have a recovery option at all if that can’t be trusted?

Yes, the autoupdate files may be corrupt. E.g., when autosave happens when crash occurred, or if your storage is failing. Nothing is impossible.

Or you could work with the file as with template, with the intention to save with new name; you removed most of the content, and then after the crash, this still unsaved file rewrites your wanted data.