fix: if all servers good, don't show empty table
continuous-integration/drone/push Build is passing
Details
continuous-integration/drone/push Build is passing
Details
This commit is contained in:
parent
d62c4e3400
commit
3058178d84
|
@ -39,11 +39,7 @@ var serverListCommand = cli.Command{
|
|||
|
||||
tableColumns := []string{"name", "host", "user", "port"}
|
||||
table := formatter.CreateTable(tableColumns)
|
||||
if internal.MachineReadable {
|
||||
defer table.JSONRender()
|
||||
} else {
|
||||
defer table.Render()
|
||||
}
|
||||
|
||||
serverNames, err := config.ReadServerNames()
|
||||
if err != nil {
|
||||
logrus.Fatal(err)
|
||||
|
@ -84,6 +80,16 @@ var serverListCommand = cli.Command{
|
|||
}
|
||||
}
|
||||
|
||||
if internal.MachineReadable {
|
||||
table.JSONRender()
|
||||
} else {
|
||||
if problemsFilter && table.NumLines() == 0 {
|
||||
logrus.Info("all servers wired up correctly 👏")
|
||||
} else {
|
||||
table.Render()
|
||||
}
|
||||
}
|
||||
|
||||
return nil
|
||||
},
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue