Skip to content

Commit

Permalink
loopd: nil-pointer bug when showing subsystems
Browse files Browse the repository at this point in the history
  • Loading branch information
ziggie1984 committed Mar 24, 2023
1 parent 7f19c43 commit 172c076
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions loopd/run.go
Original file line number Diff line number Diff line change
Expand Up @@ -179,13 +179,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
Expand All @@ -204,6 +197,13 @@ 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,
Expand Down

0 comments on commit 172c076

Please sign in to comment.