Skip to content

Commit 0cbaeaa

Browse files
ziggie1984hieblmi
authored andcommitted
loopd: nil-pointer bug when showing subsystems
1 parent 0fe952a commit 0cbaeaa

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
@@ -180,13 +180,6 @@ func Run(rpcCfg RPCConfig) error {
180180
os.Exit(0)
181181
}
182182

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

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

0 commit comments

Comments
 (0)