Skip to content
This repository was archived by the owner on Feb 7, 2020. It is now read-only.

Commit 75552fd

Browse files
committed
feat(s3): handle err case when s3 download failed
1 parent 89c27bc commit 75552fd

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

commands/s3_extract.go

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -122,6 +122,12 @@ func (c *S3ExtractCommand) Run(args []string) int {
122122

123123
objOutput, err := s3client.GetObject(putObject)
124124

125+
if err != nil {
126+
c.Ui.Output(fmt.Sprintf("Unable to download archive from s3://%s/%s, %s", c.AwsBucket, key, err))
127+
128+
return 1
129+
}
130+
125131
_, err = io.Copy(f, objOutput.Body)
126132

127133
if err != nil {

0 commit comments

Comments
 (0)