Skip to content

Commit 4cb1ce3

Browse files
author
OpenShift Bot
authored
Merge pull request #12274 from chmouel/only-show-project-name
Merged by openshift-bot
2 parents fb483eb + 9baf430 commit 4cb1ce3

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

pkg/cmd/cli/cmd/projects.go

+4-2
Original file line numberDiff line numberDiff line change
@@ -141,10 +141,12 @@ func (o ProjectsOptions) RunProjects() error {
141141
if err == nil {
142142
switch len(projects) {
143143
case 0:
144-
msg += "You are not a member of any projects. You can request a project to be created with the 'new-project' command."
144+
if !o.DisplayShort {
145+
msg += "You are not a member of any projects. You can request a project to be created with the 'new-project' command."
146+
}
145147
case 1:
146148
if o.DisplayShort {
147-
msg += fmt.Sprintf("%s", api.DisplayNameAndNameForProject(&projects[0]))
149+
msg += fmt.Sprintf("%s", projects[0].Name)
148150
} else {
149151
msg += fmt.Sprintf("You have one project on this server: %q.", api.DisplayNameAndNameForProject(&projects[0]))
150152
}

0 commit comments

Comments
 (0)