-
Notifications
You must be signed in to change notification settings - Fork 615
docs: Clarify Files.Lines behavior for empty and missing files #2174
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -235,6 +235,10 @@ data: | |
| {{ . }}{{ end }} | ||
| ``` | ||
|
|
||
| If the file you reference is empty or does not exist, `Lines` returns an empty | ||
|
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Added the empty/missing-file note because this PR changes Source: helm/helm#32303 |
||
| list rather than failing. The `range` loop then produces no output, so | ||
| referencing a missing or empty file will not cause template rendering to fail. | ||
|
|
||
| There is no way to pass files external to the chart during `helm install`. So if | ||
| you are asking users to supply data, it must be loaded using `helm install -f` | ||
| or `helm install --set`. | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Applied the same
Linesnote to the current (v4) docs because PR #32303 is the v3 backport of #32290, which lands the identicalpkg/engine/files.gofix onmain, so the empty-file behavior holds for v4 as well.Source: helm/helm#32290