Skip to content

Commit

Permalink
fix: close .profile file after write env
Browse files Browse the repository at this point in the history
  • Loading branch information
Ja7ad committed Nov 13, 2022
1 parent 28d63b4 commit 5c23105
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion cmd/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import (
"github.com/spf13/cobra"
)

var Version = "1.0.1"
var Version = "1.0.2"

// rootCmd represents the base command when called without any subcommands
var rootCmd = &cobra.Command{
Expand Down
1 change: 1 addition & 0 deletions internal/utils.go
Original file line number Diff line number Diff line change
Expand Up @@ -149,6 +149,7 @@ func setGoEnvPath() error {
if err != nil {
return err
}
defer file.Close()

if _, err := file.WriteString(env); err != nil {
return err
Expand Down

0 comments on commit 5c23105

Please sign in to comment.