From 3309911e331c7198d70a5f1d77787b21f6d0d340 Mon Sep 17 00:00:00 2001 From: Pedro Cunha Date: Wed, 11 Oct 2017 15:03:44 +0100 Subject: [PATCH] Remove redudant return --- cli/data/commit.go | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/cli/data/commit.go b/cli/data/commit.go index 5e6cc1d..200504f 100644 --- a/cli/data/commit.go +++ b/cli/data/commit.go @@ -109,8 +109,7 @@ func commitPath(path string, destination S3Path) { func uploadFileToS3(uploader *s3manager.Uploader, bucket string, key string, filePath string) { file, err := os.Open(filePath) if err != nil { - fmt.Println("Failed to open file", file, err) - os.Exit(1) + exitErrorf("Failed to open file", file, err) } defer file.Close() @@ -122,7 +121,6 @@ func uploadFileToS3(uploader *s3manager.Uploader, bucket string, key string, fil if err != nil { exitErrorf("Failed to upload data to %s/%s, %s", bucket, key, err.Error()) - return } }