You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
As a command runner, it would be convenient to be able to specify the list of programs necessary for my Justfile to run. Something like the following example:
set required-programs := ["kubectl", "helm", "helmfile"]
bootstrap: && helm-charts
kubectl apply -f foo.yaml
helm-charts:
helmfile apply --file bar.yaml
status:
helm ls -A
And if I didn't have those programs installed, just would error out before running a recipe with a helpful message saying that I need to install, say, helm & helmfile.
If this is added, I can imagine a need for [require-optional] (with a better name though) if people wanted to provide a recipe to install all the missing programs.
This is basically automatically doing #2109 and reporting an error. If that function is added, this could be solved by creating a recipe that does this. However, I still think it's worthwhile to include this feature.
The text was updated successfully, but these errors were encountered:
require-dependencies:
helm --version || echo "please install helm"
status: require-dependencies
helm ls -A
This is more verbose, since you have to add that recipe as a dependency, but more flexible, since you can add that recipe as a dependency only to those recipes which require the binaries your checking for.
I think actually the way to support this is #2178, which would allow defining a recipe to be run before any other recipe in the justfile, which would allow for checking any kind of precondition, including whether or not particular binaries are installed.
As a command runner, it would be convenient to be able to specify the list of programs necessary for my Justfile to run. Something like the following example:
And if I didn't have those programs installed, just would error out before running a recipe with a helpful message saying that I need to install, say,
helm
&helmfile
.If this is added, I can imagine a need for
[require-optional]
(with a better name though) if people wanted to provide a recipe to install all the missing programs.This is basically automatically doing #2109 and reporting an error. If that function is added, this could be solved by creating a recipe that does this. However, I still think it's worthwhile to include this feature.
The text was updated successfully, but these errors were encountered: