Skip to content

Commit 4301a1b

Browse files
committed
Fix error shadow
1 parent 2d7c277 commit 4301a1b

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

go/porcelain/deploy.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -387,7 +387,8 @@ func (n *Netlify) uploadFile(ctx context.Context, d *models.Deploy, f *FileBundl
387387

388388
switch t {
389389
case fileUpload:
390-
body, operationError := os.Open(f.Path)
390+
var body io.ReadCloser
391+
body, operationError = os.Open(f.Path)
391392
if operationError == nil {
392393
defer body.Close()
393394
params := operations.NewUploadDeployFileParams().WithDeployID(d.ID).WithPath(f.Name).WithFileBody(body)

0 commit comments

Comments
 (0)