Log the output from uploading files to GCS. (#541)

This commit is contained in:
dlorenc 2019-01-23 12:08:04 -06:00 committed by GitHub
parent a4b47a4992
commit a493035287
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 1 deletions

View File

@ -53,9 +53,11 @@ func UploadFileToBucket(gcsBucket string, filePath string, gcsPath string) (stri
log.Printf("Uploading file at %s to GCS bucket at %s\n", filePath, dst)
cmd := exec.Command("gsutil", "cp", filePath, dst)
if _, err := RunCommandWithoutTest(cmd); err != nil {
out, err := RunCommandWithoutTest(cmd)
if err != nil {
return "", fmt.Errorf("Failed to copy tarball to GCS bucket %s: %s", gcsBucket, err)
}
log.Println(string(out))
return dst, nil
}