Skip to content

Commit

Permalink
Require that data-dir config be provided
Browse files Browse the repository at this point in the history
  • Loading branch information
antw committed Dec 5, 2021
1 parent a0feed2 commit e689169
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions cmd/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,10 @@ var serverCmd = &cobra.Command{
rpcPort := viper.GetInt("rpc-port")
startAddrs := viper.GetStringSlice("start-addrs")

if dataDir == "" {
panic(fmt.Errorf("data-dir is required\n"))
}

fmt.Println("Starting server...")

if nodeName == "" {
Expand Down

0 comments on commit e689169

Please sign in to comment.