From 02e6d475909c34e1c5280df88146f07f1e752ddb Mon Sep 17 00:00:00 2001 From: Dave Collins Date: Tue, 19 Nov 2013 15:56:21 -0600 Subject: [PATCH] Return error on dir create failure from loadConfig. Rather than simply exiting on a home directory creation error, return the error so it exits via the normal path. --- config.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config.go b/config.go index 202c62cc..f9191922 100644 --- a/config.go +++ b/config.go @@ -190,7 +190,7 @@ func loadConfig() (*config, []string, error) { err := os.MkdirAll(btcdHomeDir, 0700) if err != nil { log.Errorf("%v", err) - os.Exit(-1) + return nil, nil, err } // Pre-parse the command line options to see if an alternative config