Skip to content

Commit 816b5a7

Browse files
committed
ben message tweaks
1 parent 533e96a commit 816b5a7

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

pkg/oc/cli/cmd/newapp.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -722,7 +722,7 @@ func handleError(err error, baseName, commandName, commandPath string, config *n
722722
fmt.Fprint(buf, group.suggestion)
723723
}
724724
if len(config.ArgumentClassificationErrors) > 0 && len(groups) > 0 {
725-
fmt.Fprintf(buf, "\nFor further assistance, %s classification of the argument types resulted in the following:\n", commandName)
725+
fmt.Fprintf(buf, "\nClassification of arguments is the following:\n")
726726
for _, classErr := range config.ArgumentClassificationErrors {
727727
fmt.Fprintf(buf, fmt.Sprintf("\n%s: %v\n", classErr.Key, classErr.Value))
728728
}

pkg/oc/generate/app/cmd/newapp.go

+5-5
Original file line numberDiff line numberDiff line change
@@ -313,7 +313,7 @@ func (c *AppConfig) tryToAddTemplateArguments(s string) bool {
313313
// AddArguments converts command line arguments into the appropriate bucket based on what they look like
314314
func (c *AppConfig) AddArguments(args []string) []string {
315315
unknown := []string{}
316-
winnerFmt := "The argument %s passed the %s classification tests"
316+
winnerFmt := "Argument %s was classified as %s"
317317
c.ArgumentClassificationErrors = []ArgumentClassificationError{}
318318
for _, s := range args {
319319
if len(s) == 0 {
@@ -322,14 +322,14 @@ func (c *AppConfig) AddArguments(args []string) []string {
322322

323323
switch {
324324
case c.tryToAddEnvironmentArguments(s):
325-
c.ArgumentClassificationWinner = fmt.Sprintf(winnerFmt, s, "environment")
325+
c.ArgumentClassificationWinner = fmt.Sprintf(winnerFmt, s, "an environment value")
326326
case c.tryToAddSourceArguments(s):
327-
c.ArgumentClassificationWinner = fmt.Sprintf(winnerFmt, s, "source")
327+
c.ArgumentClassificationWinner = fmt.Sprintf(winnerFmt, s, "a source repository")
328328
case c.tryToAddTemplateArguments(s):
329-
c.ArgumentClassificationWinner = fmt.Sprintf(winnerFmt, s, "template")
329+
c.ArgumentClassificationWinner = fmt.Sprintf(winnerFmt, s, "a template")
330330
case c.tryToAddComponentArguments(s):
331331
// NOTE, component argument classification currently is the most lenient, so we save it for the end
332-
c.ArgumentClassificationWinner = fmt.Sprintf(winnerFmt, s, "component")
332+
c.ArgumentClassificationWinner = fmt.Sprintf(winnerFmt, s, " an image reference with optionally a source repository")
333333
default:
334334
glog.V(2).Infof("treating %s as unknown\n", s)
335335
unknown = append(unknown, s)

0 commit comments

Comments
 (0)