aperture: allow relative macaroon/tls paths

This commit is contained in:
carla
2021-09-27 14:11:18 +02:00
parent c22c0db128
commit 264fc2f998

View File

@@ -16,6 +16,7 @@ import (
"github.com/lightninglabs/aperture/auth"
"github.com/lightninglabs/aperture/mint"
"github.com/lightninglabs/aperture/proxy"
"github.com/lightningnetwork/lnd"
"github.com/lightningnetwork/lnd/build"
"github.com/lightningnetwork/lnd/cert"
"github.com/lightningnetwork/lnd/lnrpc"
@@ -335,6 +336,14 @@ func getConfig(configFile string) (*Config, error) {
return nil, err
}
// Clean and expand our cert and macaroon paths.
cfg.Authenticator.TLSPath = lnd.CleanAndExpandPath(
cfg.Authenticator.TLSPath,
)
cfg.Authenticator.MacDir = lnd.CleanAndExpandPath(
cfg.Authenticator.MacDir,
)
// Then check the configuration that we got from the config file, all
// required values need to be set at this point.
if cfg.ListenAddr == "" {