Skip to content

Commit

Permalink
fix text file busy error on linux
Browse files Browse the repository at this point in the history
  • Loading branch information
pomdtr committed Nov 9, 2023
1 parent 9edb268 commit 040dbc3
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions cmd/upgrade.go
Original file line number Diff line number Diff line change
Expand Up @@ -144,10 +144,15 @@ func ExtractManifest(origin string) (extensions.Extension, error) {
if err != nil {
return extensions.Extension{}, err
}
defer f.Close()

if _, err := io.Copy(f, resp.Body); err != nil {
return extensions.Extension{}, err
}

if err := f.Close(); err != nil {
return extensions.Extension{}, err
}
} else {
extensionType = extensions.ExtensionTypeLocal
entrypoint = origin
Expand Down

0 comments on commit 040dbc3

Please sign in to comment.