Skip to content

Commit

Permalink
better hack
Browse files Browse the repository at this point in the history
  • Loading branch information
djdv committed Jul 8, 2019
1 parent f0db935 commit ce4fff8
Showing 1 changed file with 10 additions and 8 deletions.
18 changes: 10 additions & 8 deletions cmd/ipfs/daemon.go
Expand Up @@ -246,16 +246,18 @@ func daemonFunc(req *cmds.Request, re cmds.ResponseEmitter, env cmds.Environment
return err
}

return doInit(os.Stdout, cctx.ConfigRoot, false, nBitsForKeypairDefault, nil, conf)
}

cfgLocation = cctx.ConfigRoot

if !fsrepo.IsInitialized(cfgLocation) {
err := initWithDefaults(os.Stdout, cfgLocation, profiles)
if err != nil {
if err = doInit(os.Stdout, cctx.ConfigRoot, false, nBitsForKeypairDefault, nil, conf); err != nil {
return err
}
} else {
cfgLocation = cctx.ConfigRoot

if !fsrepo.IsInitialized(cfgLocation) {
err := initWithDefaults(os.Stdout, cfgLocation, profiles)
if err != nil {
return err
}
}
}
}

Expand Down

0 comments on commit ce4fff8

Please sign in to comment.