Skip to content

Commit

Permalink
[UX] Fix default value of ImageRegistry in odo preference view output (
Browse files Browse the repository at this point in the history
…redhat-developer#6951)

* [UX] Fix default value of ImageRegistry in odo preference view output

Signed-off-by: Parthvi <parthvi.vala@gmail.com>

* Update pkg/preference/machine_output.go

Co-authored-by: Armel Soro <armel@rm3l.org>

---------

Signed-off-by: Parthvi <parthvi.vala@gmail.com>
Co-authored-by: Armel Soro <armel@rm3l.org>
  • Loading branch information
valaparthvi and rm3l authored Jul 5, 2023
1 parent 3b73c80 commit 5911930
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pkg/odo/cli/preference/view.go
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ func HumanReadableOutput(preferenceList api.PreferenceList, registryList []api.R
preferenceT.SortBy([]table.SortBy{{Name: "PARAMETER", Mode: table.Asc}})
for _, pref := range preferenceList.Items {
value := showBlankIfNil(pref.Value)
if reflect.DeepEqual(value, pref.Default) {
if value != "" && reflect.DeepEqual(value, pref.Default) {
value = fmt.Sprintf("%v (default)", value)
}
preferenceT.AppendRow(table.Row{pref.Name, value})
Expand Down

0 comments on commit 5911930

Please sign in to comment.