diff --git a/CONTRIBUTORS.md b/CONTRIBUTORS.md index 3381b2bf6..b88740351 100644 --- a/CONTRIBUTORS.md +++ b/CONTRIBUTORS.md @@ -97,4 +97,5 @@ and we will add you. **All** contributors belong here. 💯 - [Ray Terrill](https://github.com/rayterrill) - [Kim Christensen](https://github.com/kichristensen) - [Shivam](https://github.com/Bharadwajshivam28) -- [David Gannon](https://github.com/dgannon991) \ No newline at end of file +- [David Gannon](https://github.com/dgannon991) +- [guangwu guo](https://github.com/testwill) diff --git a/pkg/runtime/runtime_manifest.go b/pkg/runtime/runtime_manifest.go index 0bb3ab6e5..aa8b7dc2b 100644 --- a/pkg/runtime/runtime_manifest.go +++ b/pkg/runtime/runtime_manifest.go @@ -687,6 +687,7 @@ func (m *RuntimeManifest) packStateBag(ctx context.Context) error { if err != nil { return log.Error(fmt.Errorf("error reading state file %s for variable %s: %w", s.Path, s.Name, err)) } + defer f.Close() _, err = io.Copy(tw, f) if err != nil {