Files
helm/pkg/engine
Mahesh Sadupalli 955dfab1e6 fix(engine): prevent Files.Lines panic on empty file
Files.Lines guards against a nil entry but an empty file inside a
chart is stored as a non-nil zero-length byte slice, so the trailing
newline check indexes s[-1] and panics. The engine recovers the panic
into a render error, making every template/install/upgrade/lint that
references the file fail.

Extend the guard to len(f[path]) == 0 and return an empty slice,
matching the behaviour for missing files.

Fixes #32279

Signed-off-by: Mahesh Sadupalli <mahesh.sadupalli@gmail.com>
(cherry picked from commit c02a9aed34)
2026-08-13 14:45:19 -04:00
..
2023-03-22 11:29:26 -04:00
2024-12-28 12:06:27 -05:00
2025-04-19 09:06:19 +02:00