Skip to content

Commit

Permalink
fix node temp home issue
Browse files Browse the repository at this point in the history
  • Loading branch information
harish551 committed Sep 19, 2024
1 parent e6f3b75 commit 3884741
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions cmd/omniflixhubd/cmd/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import (
"errors"
"io"
"os"
"path/filepath"

"github.com/cosmos/cosmos-sdk/baseapp"
banktypes "github.com/cosmos/cosmos-sdk/x/bank/types"
Expand Down Expand Up @@ -178,10 +179,7 @@ func addModuleInitFlags(startCmd *cobra.Command) {
}

func tempDir() string {
dir, err := os.MkdirTemp("", "omniflixhubtemp")
if err != nil {
dir = app.DefaultNodeHome
}
dir := filepath.Join(os.TempDir(), "."+app.Name+"-temp")
defer os.RemoveAll(dir)

return dir
Expand Down

0 comments on commit 3884741

Please sign in to comment.