From b6ac055857b451020ef05af84774b71939960ca4 Mon Sep 17 00:00:00 2001 From: Lenin Alevski Date: Wed, 18 Nov 2020 22:46:54 -0800 Subject: [PATCH] Show error message if not possible to create CAs folder (#407) Co-authored-by: Daniel Valdivia --- cmd/console/server.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/cmd/console/server.go b/cmd/console/server.go index cb3d25aa66..01332762dd 100644 --- a/cmd/console/server.go +++ b/cmd/console/server.go @@ -110,7 +110,10 @@ func startServer(ctx *cli.Context) error { // Set all certs and CAs directories. certs.GlobalCertsDir, _ = certs.NewConfigDirFromCtx(ctx, "certs-dir", certs.DefaultCertsDir.Get) certs.GlobalCertsCADir = &certs.ConfigDir{Path: filepath.Join(certs.GlobalCertsDir.Get(), certs.CertsCADir)} - logger.FatalIf(certs.MkdirAllIgnorePerm(certs.GlobalCertsCADir.Get()), "Unable to create certs CA directory at %s", certs.GlobalCertsCADir.Get()) + + if err := certs.MkdirAllIgnorePerm(certs.GlobalCertsCADir.Get()); err != nil { + log.Println(fmt.Sprintf("Unable to create certs CA directory at %s", certs.GlobalCertsCADir.Get())) + } // load all CAs from ~/.console/certs/CAs restapi.GlobalRootCAs, err = certsx.GetRootCAs(certs.GlobalCertsCADir.Get())