From cd81edf1a715c9623a24bf75c199091b277b5b6e Mon Sep 17 00:00:00 2001 From: Manuel Thalmann Date: Mon, 15 Jul 2024 14:14:07 +0200 Subject: [PATCH] Add a function to check whether a config is set --- scripts/Common/Scripts/config.fish | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/scripts/Common/Scripts/config.fish b/scripts/Common/Scripts/config.fish index 8ffdcae6..f0452b49 100644 --- a/scripts/Common/Scripts/config.fish +++ b/scripts/Common/Scripts/config.fish @@ -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