Better error handling for watching a list of resources specified in a file

This commit is contained in:
Janet Kuo
2015-10-14 15:06:06 -07:00
parent b9c7cf43b2
commit 33b9235312
4 changed files with 11 additions and 4 deletions

View File

@@ -145,7 +145,7 @@ func RunGet(f *cmdutil.Factory, out io.Writer, cmd *cobra.Command, args []string
return err
}
if len(infos) != 1 {
return fmt.Errorf("watch is only supported on a single resource - %d resources were found", len(infos))
return fmt.Errorf("watch is only supported on individual resources and resource collections - %d resources were found", len(infos))
}
info := infos[0]
mapping := info.ResourceMapping()