Skip to content

Commit

Permalink
drand#43: defines db folder after config folder is set
Browse files Browse the repository at this point in the history
  • Loading branch information
Mahrud Sayrafi committed Jul 1, 2018
1 parent e268ded commit b3e2e14
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ func main() {
}
dbFlag := cli.StringFlag{
Name: "db",
Value: path.Join(configFlag.Value, core.DefaultDbFolder),
Value: core.DefaultDbFolder,
Usage: "Folder in which to keep the database (boltdb file)",
}
seedFlag := cli.StringFlag{
Expand Down Expand Up @@ -151,7 +151,7 @@ func main() {
return runCmd(c)
},
},
{
cli.Command{
Name: "fetch",
Aliases: []string{"f"},
Usage: "fetch some randomness",
Expand Down Expand Up @@ -411,7 +411,7 @@ func contextToConfig(c *cli.Context) *core.Config {

config := c.GlobalString("config")
opts = append(opts, core.WithConfigFolder(config))
db := c.GlobalString("db")
db := path.Join(config, c.GlobalString("db"))
opts = append(opts, core.WithDbFolder(db))
period := c.Duration("period")
opts = append(opts, core.WithBeaconPeriod(period))
Expand Down

0 comments on commit b3e2e14

Please sign in to comment.