Skip to content

Commit 79faa47

Browse files
Merge pull request #20778 from coreydaley/bugzilla_1622920_remove_count_from_error_message
Remove count from new-build/new-app error message
2 parents ae86f05 + bcc875c commit 79faa47

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

pkg/oc/lib/newapp/app/errors.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ type ErrMultipleMatches struct {
8989
}
9090

9191
func (e ErrMultipleMatches) Error() string {
92-
return fmt.Sprintf("multiple images or templates matched %q: %d", e.Value, len(e.Matches))
92+
return fmt.Sprintf("multiple images or templates matched %q", e.Value)
9393
}
9494

9595
// ErrNameRequired is the error returned by new-app when a name cannot be

test/cmd/newapp.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -456,7 +456,7 @@ os::cmd::expect_success_and_text 'oc new-build --binary --image=ruby --strategy=
456456
os::cmd::expect_success 'oc new-app --image-stream ruby https://github.com/sclorg/rails-ex --dry-run'
457457
# when latest does not exist, there are multiple partial matches (2.2, 2.3, 2.4, 2.5)
458458
os::cmd::expect_success 'oc delete imagestreamtag ruby:latest'
459-
os::cmd::expect_failure_and_text 'oc new-app --image-stream ruby https://github.com/sclorg/rails-ex --dry-run' 'error: multiple images or templates matched \"ruby\":'
459+
os::cmd::expect_failure_and_text 'oc new-app --image-stream ruby https://github.com/sclorg/rails-ex --dry-run' 'error: multiple images or templates matched \"ruby\"'
460460
# when only 2.5 exists, there is a single partial match (2.5)
461461
os::cmd::expect_success 'oc delete imagestreamtag ruby:2.2'
462462
os::cmd::expect_success 'oc delete imagestreamtag ruby:2.3'

0 commit comments

Comments
 (0)