Skip to content

Commit 172c076

Browse files
committed
loopd: nil-pointer bug when showing subsystems
1 parent 7f19c43 commit 172c076

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

loopd/run.go

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -179,13 +179,6 @@ func Run(rpcCfg RPCConfig) error {
179179
os.Exit(0)
180180
}
181181

182-
// Special show command to list supported subsystems and exit.
183-
if config.DebugLevel == "show" {
184-
fmt.Printf("Supported subsystems: %v\n",
185-
logWriter.SupportedSubsystems())
186-
os.Exit(0)
187-
}
188-
189182
// Validate our config before we proceed.
190183
if err := Validate(&config); err != nil {
191184
return err
@@ -204,6 +197,13 @@ func Run(rpcCfg RPCConfig) error {
204197
logWriter := build.NewRotatingLogWriter()
205198
SetupLoggers(logWriter, shutdownInterceptor)
206199

200+
// Special show command to list supported subsystems and exit.
201+
if config.DebugLevel == "show" {
202+
fmt.Printf("Supported subsystems: %v\n",
203+
logWriter.SupportedSubsystems())
204+
os.Exit(0)
205+
}
206+
207207
err = logWriter.InitLogRotator(
208208
filepath.Join(config.LogDir, defaultLogFilename),
209209
config.MaxLogFileSize, config.MaxLogFiles,

0 commit comments

Comments
 (0)