mirror of
https://github.com/FlipsideCrypto/dcrd.git
synced 2026-02-06 10:56:47 +00:00
Don't create .dcrd willy-nilly.
This interferes with the installer when it tries to detect if the required .dirs already exist or not. Debated with jrick and ay-p.
This commit is contained in:
parent
2bbfd5f250
commit
fa72e214db
@ -176,20 +176,13 @@ func loadConfig() (*config, []string, error) {
|
||||
RPCCert: defaultRPCCertFile,
|
||||
}
|
||||
|
||||
// Create the home directory if it doesn't already exist.
|
||||
err := os.MkdirAll(dcrdHomeDir, 0700)
|
||||
if err != nil {
|
||||
fmt.Fprintf(os.Stderr, "%v\n", err)
|
||||
os.Exit(-1)
|
||||
}
|
||||
|
||||
// Pre-parse the command line options to see if an alternative config
|
||||
// file, the version flag, or the list commands flag was specified. Any
|
||||
// errors aside from the help message error can be ignored here since
|
||||
// they will be caught by the final parse below.
|
||||
preCfg := cfg
|
||||
preParser := flags.NewParser(&preCfg, flags.HelpFlag)
|
||||
_, err = preParser.Parse()
|
||||
_, err := preParser.Parse()
|
||||
if err != nil {
|
||||
if e, ok := err.(*flags.Error); ok && e.Type == flags.ErrHelp {
|
||||
fmt.Fprintln(os.Stderr, err)
|
||||
|
||||
Loading…
Reference in New Issue
Block a user