volsync
volsync copied to clipboard
Return code ignored in Rclone & Rsync mover
Describe the bug The main rclone mover script attempts to capture and print the return code of Rclone. There are a couple of problems:
- With the addition of backube/scribe#104, extra commands have been inserted before
rcis captured from$? - The script (correctly IMO) runs with
set -e, meaning it will terminate on any non-zero command. This means it's not possible for the final status line to ever say anything other thanrc=0
The error handling of this script should be re-evaluated:
- Should we do something other than bail on command failure?
- If so, commands need to be
if [[ cmd ]] ...to permit catching and processing the failure - If not,
rcshould be removed so as to not mislead
- If so, commands need to be
Steps to reproduce
Expected behavior
Actual results
Additional context I think this is fairly low-priority as I'm not aware of any current negative effects. I think this is more for clarity & cleanup.
Looks like the same problem exists in the rsync mover. :crying_cat_face: