Skip to content

Commit 8adf826

Browse files
committed
ben message tweaks
1 parent 40905c4 commit 8adf826

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/cmd/newapp.go

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

324324
switch {
325325
case c.tryToAddEnvironmentArguments(s):
326-
c.ArgumentClassificationWinner = fmt.Sprintf(winnerFmt, s, "environment")
326+
c.ArgumentClassificationWinner = fmt.Sprintf(winnerFmt, s, "an environment value")
327327
case c.tryToAddSourceArguments(s):
328-
c.ArgumentClassificationWinner = fmt.Sprintf(winnerFmt, s, "source")
328+
c.ArgumentClassificationWinner = fmt.Sprintf(winnerFmt, s, "a source repository")
329329
case c.tryToAddTemplateArguments(s):
330-
c.ArgumentClassificationWinner = fmt.Sprintf(winnerFmt, s, "template")
330+
c.ArgumentClassificationWinner = fmt.Sprintf(winnerFmt, s, "a template")
331331
case c.tryToAddComponentArguments(s):
332332
// NOTE, component argument classification currently is the most lenient, so we save it for the end
333-
c.ArgumentClassificationWinner = fmt.Sprintf(winnerFmt, s, "component")
333+
c.ArgumentClassificationWinner = fmt.Sprintf(winnerFmt, s, " an image reference with optionally a source repository")
334334
default:
335335
glog.V(2).Infof("treating %s as unknown\n", s)
336336
unknown = append(unknown, s)

0 commit comments

Comments
 (0)