A better way to write this templated ignore? #3547
-
In my bin directory I have a this fragement:
This excludes a dpkg/apt specific script on anything that isn't Debian based (and that I use). This obviously doesn't even work on android/Termux where osRelease is empty, so in fact I have a custom variable and it reads like this instead:
What I would want to write is something like:
But I can't figure out how to write a like like that in your template system. EDIT: I could possibly instead use lookPath and look for dpkg/apt. But I would also still like to know how to test for membership in lists. Especially since the function has is right there in the docs: http://masterminds.github.io/sprig/lists.html |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 4 replies
-
Have you tried |
Beta Was this translation helpful? Give feedback.
You probably need something like
if not (has .custom.linux_flavour (list "debian" "raspbian" "ubuntu" "android"))