@@ -57,20 +57,18 @@ func init() {
5757}
5858
5959func addClusterConfigFlag (cmd * cobra.Command ) {
60- cmd .PersistentFlags ().StringVarP (& flagClusterConfig , "config" , "c" , "" , "path to a Cortex cluster configuration file" )
60+ cmd .PersistentFlags ().StringVarP (& flagClusterConfig , "config" , "c" , "" , "path to a cluster configuration file" )
6161 cmd .PersistentFlags ().SetAnnotation ("config" , cobra .BashCompFilenameExt , configFileExts )
6262}
6363
6464var clusterCmd = & cobra.Command {
6565 Use : "cluster" ,
66- Short : "manage a Cortex cluster" ,
67- Long : "Manage a Cortex cluster" ,
66+ Short : "manage a cluster" ,
6867}
6968
7069var upCmd = & cobra.Command {
7170 Use : "up" ,
72- Short : "spin up a Cortex cluster" ,
73- Long : `This command spins up a Cortex cluster on your AWS account.` ,
71+ Short : "spin up a cluster" ,
7472 Args : cobra .NoArgs ,
7573 Run : func (cmd * cobra.Command , args []string ) {
7674 if err := checkDockerRunning (); err != nil {
@@ -97,8 +95,7 @@ var upCmd = &cobra.Command{
9795
9896var updateCmd = & cobra.Command {
9997 Use : "update" ,
100- Short : "update a Cortex cluster" ,
101- Long : `This command updates a Cortex cluster.` ,
98+ Short : "update a cluster" ,
10299 Args : cobra .NoArgs ,
103100 Run : func (cmd * cobra.Command , args []string ) {
104101 if err := checkDockerRunning (); err != nil {
@@ -126,8 +123,7 @@ var updateCmd = &cobra.Command{
126123
127124var infoCmd = & cobra.Command {
128125 Use : "info" ,
129- Short : "get information about a Cortex cluster" ,
130- Long : `This command gets information about a Cortex cluster.` ,
126+ Short : "get information about a cluster" ,
131127 Args : cobra .NoArgs ,
132128 Run : func (cmd * cobra.Command , args []string ) {
133129 if err := checkDockerRunning (); err != nil {
@@ -145,7 +141,9 @@ var infoCmd = &cobra.Command{
145141 if err != nil {
146142 errors .Exit (err )
147143 }
148- if strings .Contains (out , "there isn't a cortex cluster" ) {
144+
145+ // note: if modifying this string, search the codebase for it and change all occurrences
146+ if strings .Contains (out , "there is no cluster" ) {
149147 errors .Exit ()
150148 }
151149
@@ -176,8 +174,7 @@ var infoCmd = &cobra.Command{
176174
177175var downCmd = & cobra.Command {
178176 Use : "down" ,
179- Short : "spin down a Cortex cluster" ,
180- Long : `This command spins down a Cortex cluster.` ,
177+ Short : "spin down a cluster" ,
181178 Args : cobra .NoArgs ,
182179 Run : func (cmd * cobra.Command , args []string ) {
183180 if err := checkDockerRunning (); err != nil {
@@ -267,14 +264,16 @@ func refreshCachedClusterConfig(awsCreds *AWSCredentials) *clusterconfig.Cluster
267264 }
268265
269266 if userClusterConfig .Region == nil {
270- errors .Exit (fmt .Sprintf ("unable to find an existing cortex cluster; please configure \" %s\" to the s3 region of an existing cortex cluster or create a cortex cluster with `cortex cluster up`" , clusterconfig .RegionKey ))
267+ errors .Exit (fmt .Sprintf ("unable to find an existing cluster; please configure \" %s\" to the s3 region of an existing cluster or create a cluster with `cortex cluster up`" , clusterconfig .RegionKey ))
271268 }
272269
273270 out , err := runRefreshClusterConfig (userClusterConfig , awsCreds )
274271 if err != nil {
275272 errors .Exit (err )
276273 }
277- if strings .Contains (out , "there isn't a cortex cluster" ) {
274+
275+ // note: if modifying this string, search the codebase for it and change all occurrences
276+ if strings .Contains (out , "there is no cluster" ) {
278277 errors .Exit ()
279278 }
280279
0 commit comments