diff options
author | Nathan Todd-Stone <me@nathants.com> | 2021-06-09 13:33:15 -1000 |
---|---|---|
committer | Sean Whitton <spwhitton@spwhitton.name> | 2021-06-15 13:47:21 -0700 |
commit | b4ace82ebcaa3c009f1e51b0077cc088f45ead24 (patch) | |
tree | 775a603165d02c0404377e0cffbd871bf9c6f4b4 | |
parent | 27b26312169134c578a97c88acb7c117e92f46b8 (diff) | |
download | git-remote-gcrypt-b4ace82ebcaa3c009f1e51b0077cc088f45ead24.tar.gz |
pass --error-on-no-transfer to 'rclone copyto'
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 <me@nathants.com>
-rwxr-xr-x | git-remote-gcrypt | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/git-remote-gcrypt b/git-remote-gcrypt index c519bf8..7e7240f 100755 --- a/git-remote-gcrypt +++ b/git-remote-gcrypt @@ -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" @@ -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" |