From a6c32df31a13f0e8c3ce2ec045852b5893a02bb0 Mon Sep 17 00:00:00 2001 From: ErikEk Date: Tue, 22 Jun 2021 01:32:54 +0200 Subject: [PATCH] lncli: check for existence of tls file --- cmd/lncli/profile.go | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/cmd/lncli/profile.go b/cmd/lncli/profile.go index 9c441712..5f684b3e 100644 --- a/cmd/lncli/profile.go +++ b/cmd/lncli/profile.go @@ -124,12 +124,11 @@ func profileFromContext(ctx *cli.Context, store, skipMacaroons bool) ( // Load the certificate file now, if specified. We store it as plain PEM // directly. var tlsCert []byte - if lnrpc.FileExists(tlsCertPath) { + if tlsCertPath != "" { var err error tlsCert, err = ioutil.ReadFile(tlsCertPath) if err != nil { - return nil, fmt.Errorf("could not load TLS cert file "+ - "%s: %v", tlsCertPath, err) + return nil, fmt.Errorf("could not load TLS cert file: %v", err) } }