volsync icon indicating copy to clipboard operation
volsync copied to clipboard

Return code ignored in Rclone & Rsync mover

Open JohnStrunk opened this issue 4 years ago • 1 comments

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 rc is 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 than rc=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, rc should be removed so as to not mislead

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.

JohnStrunk avatar Feb 09 '21 18:02 JohnStrunk

Looks like the same problem exists in the rsync mover. :crying_cat_face:

JohnStrunk avatar Feb 10 '21 21:02 JohnStrunk