Skip to content

Commit

Permalink
pass --error-on-no-transfer to 'rclone copyto'
Browse files Browse the repository at this point in the history
GET and PUT are meant to exit nonzero on failure, and without this flag, they
always exit zero when rclone is used, even when a file is not found.  That
confuses other parts of the code.

Signed-off-by: Nathan Todd-Stone <[email protected]>
  • Loading branch information
nathants authored and spwhitton committed Jun 15, 2021
1 parent 27b2631 commit b4ace82
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions git-remote-gcrypt
Original file line number Diff line number Diff line change
Expand Up @@ -238,7 +238,7 @@ GET()
(exec 0>&-; rsync -I -W "$(rsynclocation "$1")"/"$2" "$3" >&2)
elif isurl rclone "$1"
then
(exec 0>&-; rclone copyto "${1#rclone://}"/"$2" "$3" >&2)
(exec 0>&-; rclone copyto --error-on-no-transfer "${1#rclone://}"/"$2" "$3" >&2)
elif islocalrepo "$1"
then
cat "$1/$2" > "$3"
Expand All @@ -258,7 +258,7 @@ PUT()
rsync $Conf_rsync_put_flags -I -W "$3" "$(rsynclocation "$1")"/"$2" >&2
elif isurl rclone "$1"
then
rclone copyto "$3" "${1#rclone://}"/"$2" >&2
rclone copyto --error-on-no-transfer "$3" "${1#rclone://}"/"$2" >&2
elif islocalrepo "$1"
then
cat >| "$1/$2" < "$3"
Expand Down

0 comments on commit b4ace82

Please sign in to comment.