config: properly show list of sub-systems for show debuglevel

Fixes #1772.
This commit is contained in:
Olaoluwa Osuntokun 2018-08-23 19:48:21 -07:00
parent de92dac6a8
commit b9db220e8c
No known key found for this signature in database
GPG Key ID: 964EA263DD637C21

@ -788,6 +788,12 @@ func loadConfig() (*config, error) {
registeredChains.PrimaryChain().String(),
normalizeNetwork(activeNetParams.Name))
// Special show command to list supported subsystems and exit.
if cfg.DebugLevel == "show" {
fmt.Println("Supported subsystems", supportedSubsystems())
os.Exit(0)
}
// Initialize logging at the default logging level.
initLogRotator(
filepath.Join(cfg.LogDir, defaultLogFilename),