Skip to content

Commit

Permalink
Merge pull request #918 from testwill/close_file
Browse files Browse the repository at this point in the history
fix: close pluginFile
  • Loading branch information
matryer authored Sep 10, 2024
2 parents 085bf61 + 2666191 commit 1377be6
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions pkg/plugins/install.go
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,7 @@ func (i Installer) writePluginFiles(dstPath string, plugin metadata.Plugin) erro
if err != nil {
return errors.Wrapf(err, "create plugin file %s", f.Path)
}
defer writer.Close()
reader := strings.NewReader(f.Content)
if _, err := io.Copy(writer, reader); err != nil {
return errors.Wrapf(err, "write plugin file %s", f.Path)
Expand Down

0 comments on commit 1377be6

Please sign in to comment.