Skip to content

Commit

Permalink
fix: close output file (#1436)
Browse files Browse the repository at this point in the history
  • Loading branch information
testwill committed Apr 18, 2024
1 parent 22eb285 commit cdc9c2c
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions cmd/config/configInit.go
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ func NewCmdConfigInit() *cobra.Command {
if err != nil {
l.Log().Fatalf("Failed to create/overwrite output file: %s", err)
}
defer file.Close()
// write content
if _, err = file.WriteString(config.DefaultConfig); err != nil {
l.Log().Fatalf("Failed to write to output file: %+v", err)
Expand Down

0 comments on commit cdc9c2c

Please sign in to comment.