From 409534738a6f9d8f36d1cc5dd0cdd926d319cbb4 Mon Sep 17 00:00:00 2001 From: Gennady Lipenkov Date: Wed, 8 Jul 2020 22:22:55 +0300 Subject: [PATCH] Add error check --- post-processor/yandex-import/post-processor.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/post-processor/yandex-import/post-processor.go b/post-processor/yandex-import/post-processor.go index 50383de14..655f77cfb 100644 --- a/post-processor/yandex-import/post-processor.go +++ b/post-processor/yandex-import/post-processor.go @@ -241,6 +241,10 @@ func uploadToBucket(s3conn *s3.S3, ui packer.Ui, artifact packer.Artifact, bucke req.Config.S3ForcePathStyle = aws.Bool(true) urlStr, _, err := req.PresignRequest(15 * time.Minute) + if err != nil { + ui.Say(fmt.Sprintf("Failed to presign url: %s", err)) + return "", err + } return urlStr, nil }