Skip to content
This repository was archived by the owner on Aug 30, 2024. It is now read-only.

Send stderr to ioutil.discard and log more human readable error #14

Merged
merged 2 commits into from
May 12, 2020

Conversation

anthonyshull
Copy link
Contributor

The large block of text was caused by sending stderr -> stderr. I am sending it to ioutil.Discard. But, that does swallow some useful errors. For example, if you try to sync a directory that doesn't exist on the remote you get a helpful message alluding to such. The "error" itself is just exit status code 11.

It might be worth finding or creating a mapping of rsync exit status errors to human readable errors. Also, I'm not sure if different rsync versions will give the exact some error text.

@anthonyshull anthonyshull requested review from coadler and ammario May 12, 2020 16:52
Co-authored-by: Ammar Bandukwala <ammar@ammar.io>
@anthonyshull anthonyshull merged commit f7d230b into master May 12, 2020
@anthonyshull anthonyshull deleted the better-rsync-missing-error branch May 13, 2020 22:43
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants