Merge "Fix an output bug in get-context"

This commit is contained in:
Zuul 2020-02-06 19:11:56 +00:00 committed by Gerrit Code Review
commit cac75584d0
2 changed files with 3 additions and 2 deletions

View File

@ -95,8 +95,8 @@ func getContexts(out io.Writer, airconfig *config.Config) error {
if err != nil {
return err
}
if contexts == nil {
fmt.Fprint(out, "No Contexts found in the configuration.\n")
if len(contexts) == 0 {
fmt.Fprintln(out, "No Contexts found in the configuration.")
}
for _, context := range contexts {
fmt.Fprintf(out, "%s", context.PrettyString())

View File

@ -0,0 +1 @@
No Contexts found in the configuration.