mirror watch: Exit on error while copying. (#2511)

mirror: exit, if copy error occurs while watching.

Fixes #2505
This commit is contained in:
Aarushi Arya
2018-08-23 15:58:14 -07:00
committed by kannappanr
parent a1110bc022
commit bc679788ac
+1
View File
@@ -290,6 +290,7 @@ func (mj *mirrorJob) startStatus() {
if sURLs.SourceContent != nil {
errorIf(sURLs.Error.Trace(sURLs.SourceContent.URL.String()),
fmt.Sprintf("Failed to copy `%s`.", sURLs.SourceContent.URL.String()))
os.Exit(1)
} else {
// When sURLs.SourceContent is nil, we know that we have an error related to removing
errorIf(sURLs.Error.Trace(sURLs.TargetContent.URL.String()),