Request:
Duplicacy shall not proceed with whatever operation if pre-whatever script exited with non-zero code.
Use case examples (potentially implementable in GUI based on user feedback/possible telemetry usage data):
- Cancel operation if remaining battery life is under threshold
- Cancel operation if connected to certain [wireless] network
- Cancel operation is moon is full and date is Friday 13
- etc.
In the current state the error is reported, e.g. Failed to run script: exit status 1
but backup still proceeds. What’s the point of checking exit status and then ignoring it… Perhaps I should have posted this in the “bugs” section instead.
mymac:~ me$ cat .duplicacy/scripts/pre-backup
#!/bin/bash
exit 1
mymac:~ me$ duplicacy -version |grep -A 1 -i "version" | grep -v -i "version"
2.1.1
mymac:~ me$ duplicacy backup
Running script /Users/me/.duplicacy/scripts/pre-backup
Failed to run script: exit status 1
Storage set to sftp://me@my.server.com:22//Volumes/duplicacy
Last backup at revision 283 found
Indexing /Users/me
Loaded 46 include/exclude pattern(s)
^C