From e7aecfe6cb36c9a1c06a9874af909c86a041e613 Mon Sep 17 00:00:00 2001 From: Lucas Briese Date: Thu, 30 Nov 2023 14:05:43 +0100 Subject: [PATCH] fix: continue init if variable is not found in config #27 --- gmod/initConfig.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gmod/initConfig.sh b/gmod/initConfig.sh index c30bb9b..fb61e95 100644 --- a/gmod/initConfig.sh +++ b/gmod/initConfig.sh @@ -14,7 +14,7 @@ function configReplace() { source="$1" target="\"$2\"" - count=$(grep -Poc "($source).+" "${CFG_PATH}") + count=$(grep -Poc "($source).+" "${CFG_PATH}" || echo 0) echo "[initConfig.sh]Request for replacing $source to $target, source is found $count times"