From 8aa4389fe995af0cdfbe607a26318adbd77d4562 Mon Sep 17 00:00:00 2001 From: anessi <16045045+anessi@users.noreply.github.com> Date: Fri, 1 Sep 2023 08:52:30 +0200 Subject: [PATCH] Add missing documentation for isFile function (#996) See https://github.com/helmfile/helmfile/commit/ed436ba68bd80057be99c20296c26dd4996b69dc Signed-off-by: anessi Co-authored-by: anessi --- docs/templating_funcs.md | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/docs/templating_funcs.md b/docs/templating_funcs.md index d7b086f7..8e055de0 100644 --- a/docs/templating_funcs.md +++ b/docs/templating_funcs.md @@ -32,6 +32,13 @@ The `envExec` function allows you to run a command with environment variables de {{ $cmdOutpot := envExec (dict "envKey" "envValue") "./mycmd" (list "arg1" "arg2" "--flag1") }} ``` +#### `isFile` +The `isFile` function allows you to check if a file exists. On failure, the template rendering will fail with an error message. + +```yaml +{{ if isFile "./myfile" }} +``` + #### `readFile` The `readFile` function allows you to read a file and return its content as the function output. On failure, the template rendering will fail with an error message.