Skip to content

Commit dd2c493

Browse files
committed
cli/command/system: Fix missing components in version output
The `Components` weren't actually copied to the output struct. Signed-off-by: Paweł Gronowski <[email protected]>
1 parent 2cfd9df commit dd2c493

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

cli/command/system/version.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -137,6 +137,7 @@ func newServerVersion(sv client.ServerVersionResult) *serverVersion {
137137
Os: sv.Os,
138138
Arch: sv.Arch,
139139
Experimental: sv.Experimental, //nolint:staticcheck // ignore deprecated field.
140+
Components: make([]system.ComponentVersion, 0, len(sv.Components)),
140141
}
141142
foundEngine := false
142143
for _, component := range sv.Components {
@@ -152,6 +153,7 @@ func newServerVersion(sv client.ServerVersionResult) *serverVersion {
152153
out.Experimental = func() bool { b, _ := strconv.ParseBool(component.Details["Experimental"]); return b }()
153154
out.BuildTime = reformatDate(component.Details["BuildTime"])
154155
}
156+
out.Components = append(out.Components, component)
155157
}
156158

157159
if !foundEngine {

0 commit comments

Comments
 (0)