diff --git a/cmd/dcrctl/config.go b/cmd/dcrctl/config.go index 45e52094..34863d6d 100644 --- a/cmd/dcrctl/config.go +++ b/cmd/dcrctl/config.go @@ -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)