helm/internal/copystructure
Philipp Born e3829ebbbb
fix(copystructure): handle nil elements in slice copying
When copying slices containing nil interface{} elements, the copyValue
function would panic with 'reflect: call of reflect.Value.Set on zero
Value'. This occurred because reflect.ValueOf(nil) returns a zero Value
that cannot be set.

This issue was introduced in v4.1.0 when replacing mitchellh/copystructure
with an internal implementation. The fix mirrors the existing nil handling
logic used for map values.

Fixes helm template panic when processing charts with YAML like:
  extraArgs:
    -

Added test case to verify slice elements with nil values are properly
handled during deep copy operations.

Signed-off-by: Philipp Born <git@pborn.eu>
2026-01-22 18:28:05 +01:00
..
copystructure.go fix(copystructure): handle nil elements in slice copying 2026-01-22 18:28:05 +01:00
copystructure_test.go fix(copystructure): handle nil elements in slice copying 2026-01-22 18:28:05 +01:00