Unison: fatal error failure reading from the standard input

42 views Asked by At

When calling a unison command from crontab it produces this error: "Fatal error: failure reading from the standard input (End of file)". Example crontab line:

*/5 * * * * USER test -e /var/lock/unison-SCRIPT && exit 0 || (touch /var/lock/unison-SCRIPT;unison SCRIPT;rm /var/lock/unison-SCRIPT)

It first checks the LOCK, sets the LOCK, issues the command, removes the LOCK. The SCRIPT.prf is as follows:

# Unison preferences
label = Some text describing unidirectional sync
root = /home/USER/SOME/LOCAL/PATH
root = /home/USER/ANOTHER/LOCAL/PATH
logfile = SCRIPT.log
force = /home/USER/SOME/LOCAL/PATH

Version: Unison 2.51.5 (ocaml 4.13.1)

I tried to reproduce the error from the command line, but there sync worked well:

> unison SCRIPT

The error first occured after upgrading from Ubuntu 20.04.3 LTS to Ubuntu 22.04.3 LTS.

1

There are 1 answers

0
StefanMz On BEST ANSWER

Adding batch = true to the unison preferences solved the problem.