HelmfileCommand outside hook scope
Hello,
I see that the .HelmfileCommand is accessible in e.g. hooks, enabling to pass the helmfile command to be used in evaluations in the hook. However, HelmfileCommand does not seem to be accessible outside of this scope, for instance to use it as an argument to regular exec scripts in either helmfile or gotmpl files.
We have a script (invoked through gotmpl) which accesses the kubernetes cluster, and that script contains strict error handling (=sync/apply should fail if scrips fails due to e.g. inaccessible cluster). However, in our case helmfile sometimes run commands without a cluster, e.g. helmfile repos. And then the script naturally fails.
So we we're thinking of having this in the script:
#!/bin/bash
helmfile_command=$1
if [[ "$helmfile_command" != "apply" && "$helmfile_command" != "sync" ]];
then
exit 0
fi
# ...
But we can't retrieve the helmfile command at this point. Perhaps we're missing something. If not, perhaps this could be a feature request?