Add a function to check whether a config is set

This commit is contained in:
Manuel Thalmann 2024-07-15 14:14:07 +02:00
parent 1037ace214
commit cd81edf1a7

View file

@ -4,6 +4,10 @@ function getConfig -S -a property
evalModule "$CONFIG_MODULE" "$property" $argv[2..]
end
function isSet -S -a property
not test "$(getConfig "$property" --json)" = "null"
end
function collectionActive -S -a name
[ "$(getConfig "valhalla.software.$name" --json)" = "true" ]
end