runrestic exit with status code 0 when parsing fails
saimonn opened this issue · 4 comments
saimonn commented
This makes, for example, systemd thinks everything is okay, when it is not.
# systemctl status runrestic
● runrestic.service - runrestic backup
bash-4.2# systemctl status runrestic.service
● runrestic.service - runrestic backup
Loaded: loaded (/etc/systemd/system/runrestic.service; static; vendor preset: disabled)
Active: inactive (dead) since Tue 2020-03-10 12:42:04 CET; 2h 5min ago
Process: 17443 ExecStart=/usr/local/bin/runrestic (code=exited, status=0/SUCCESS)
Main PID: 17443 (code=exited, status=0/SUCCESS)
Mar 10 12:42:04 myhostname systemd[1]: Starting runrestic backup...
Mar 10 12:42:04 myhostname runrestic[17443]: Problem parsing /etc/runrestic.toml: invalid literal for int() with base 0: '4...r 360)
Mar 10 12:42:04 myhostname systemd[1]: Started runrestic backup.
Hint: Some lines were ellipsized, use -l to show in full.
andreasnuesslein commented
thanks for the PR! :) do you think you could add a test case? that would super cool
andreasnuesslein commented
I'll close this issue as I think the PR is sufficient
saimonn commented
Ok, I though when the PR mentions Closes #n
then the issue is automagically closed by github.
Maybe that work only with commit messages ?
andreasnuesslein commented
oh yeah - but I think for these small changes two seperate "tickets" (issue and PR) are overkill :)