aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorWynn Wolf Arbor2020-09-16 19:32:48 +0200
committerWynn Wolf Arbor2020-09-17 10:33:03 +0200
commite682fa768efaa540326c4d8f514fb017f630c88d (patch)
treec5739da3add3317a8b2d0a941d9e3aea0cedf8aa
parentaed7e413a4424f215c4b7ff67c714d5f7c14476a (diff)
downloadlifeboat-e682fa768efaa540326c4d8f514fb017f630c88d.tar.gz
Make sure to return successfully if config/sync is missing0.2.1
In sync_default, we test whether the config/sync file exists before reading from it. If it does not exist, we return from the function using the exit status of the last command (test), which in this case is 1. For default setups that do not specify a config/sync file, this will lead to the script as a whole exiting unsuccessfully even though no error occurred. Make sure to set the exit status to 0 in order to signal successful completion of the sync task. Reported-by: Jan Rathner <jarainf@freenode>
-rwxr-xr-xlifeboat2
1 files changed, 1 insertions, 1 deletions
diff --git a/lifeboat b/lifeboat
index 3546f5a..e84c916 100755
--- a/lifeboat
+++ b/lifeboat
@@ -44,7 +44,7 @@ clean_default() {
}
sync_default() {
- test -r config/sync || return
+ test -r config/sync || return 0
while read -r target_spec; do
target=$(echo "$target_spec" | cut -f1)