Skip to content

Commit

Permalink
feat: improve code
Browse files Browse the repository at this point in the history
Signed-off-by: Smuu <18609909+Smuu@users.noreply.github.com>
  • Loading branch information
smuu committed Mar 16, 2023
1 parent 6e50b78 commit 23427f8
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions app/app.go
Original file line number Diff line number Diff line change
Expand Up @@ -172,17 +172,17 @@ var (
var _ servertypes.Application = (*App)(nil)

func init() {
homeDir := os.Getenv("CELESTIA_HOME")
userHomeDir := os.Getenv("CELESTIA_HOME")

if homeDir == "" {
userHomeDir, err := os.UserHomeDir()
if userHomeDir == "" {
var err error
userHomeDir, err = os.UserHomeDir()
if err != nil {
panic(err)
}
homeDir = userHomeDir
}

DefaultNodeHome = filepath.Join(homeDir, "."+Name)
DefaultNodeHome = filepath.Join(userHomeDir, "."+Name)
}

// App extends an ABCI application, but with most of its parameters exported.
Expand Down

0 comments on commit 23427f8

Please sign in to comment.