Show error when no scannable servers are detected.

This commit is contained in:
Kota Kanbe
2016-09-14 09:35:15 +09:00
parent 1b85e56961
commit f5eeed0bc2
4 changed files with 17 additions and 5 deletions

View File

@@ -150,7 +150,10 @@ func (p *ConfigtestCmd) Execute(_ context.Context, f *flag.FlagSet, _ ...interfa
}
Log.Info("Detecting Server/Contianer OS... ")
scan.InitServers(Log)
if err := scan.InitServers(Log); err != nil {
Log.Errorf("Failed to init servers: %s", err)
return subcommands.ExitFailure
}
Log.Info("Checking sudo configuration... ")
if err := scan.CheckIfSudoNoPasswd(Log); err != nil {