mirror of
https://github.com/lightninglabs/loop.git
synced 2026-08-13 12:33:03 +02:00
loopd: nil-pointer bug when showing subsystems
This commit is contained in:
parent
0fe952a5c7
commit
59d7d08aee
1 changed files with 8 additions and 7 deletions
15
loopd/run.go
15
loopd/run.go
|
|
@ -180,13 +180,6 @@ func Run(rpcCfg RPCConfig) error {
|
|||
os.Exit(0)
|
||||
}
|
||||
|
||||
// Special show command to list supported subsystems and exit.
|
||||
if config.DebugLevel == "show" {
|
||||
fmt.Printf("Supported subsystems: %v\n",
|
||||
logWriter.SupportedSubsystems())
|
||||
os.Exit(0)
|
||||
}
|
||||
|
||||
// Validate our config before we proceed.
|
||||
if err := Validate(&config); err != nil {
|
||||
return err
|
||||
|
|
@ -205,6 +198,14 @@ func Run(rpcCfg RPCConfig) error {
|
|||
logWriter := build.NewRotatingLogWriter()
|
||||
SetupLoggers(logWriter, shutdownInterceptor)
|
||||
|
||||
// Special show command to list supported subsystems and exit.
|
||||
if config.DebugLevel == "show" {
|
||||
fmt.Printf("Supported subsystems: %v\n",
|
||||
logWriter.SupportedSubsystems())
|
||||
|
||||
os.Exit(0)
|
||||
}
|
||||
|
||||
err = logWriter.InitLogRotator(
|
||||
filepath.Join(config.LogDir, defaultLogFilename),
|
||||
config.MaxLogFileSize, config.MaxLogFiles,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue