Merge "Warn instead of die on undefined config names"
diff --git a/inc/meta-config b/inc/meta-config
index 6252135..be73b60 100644
--- a/inc/meta-config
+++ b/inc/meta-config
@@ -181,7 +181,8 @@
realconfigfile=$(eval "echo $configfile")
if [[ -z $realconfigfile ]]; then
- die $LINENO "bogus config file specification: $configfile is undefined"
+ warn $LINENO "unknown config file specification: $configfile is undefined"
+ break
fi
dir=$(dirname $realconfigfile)
if [[ -d $dir ]]; then
diff --git a/tests/test_meta_config.sh b/tests/test_meta_config.sh
index 92f9c01..087aaf4 100755
--- a/tests/test_meta_config.sh
+++ b/tests/test_meta_config.sh
@@ -29,6 +29,10 @@
exit -1
}
+function warn {
+ return 0
+}
+
TEST_1C_ADD="[eee]
type=new
multi = foo2"
@@ -92,7 +96,7 @@
[[test3|test-space.conf]]
[DEFAULT]
attribute=value
-
+
# the above line has a single space
[[test4|\$TEST4_DIR/\$TEST4_FILE]]
@@ -378,11 +382,10 @@
echo -n "merge_config_group test9 undefined conf file: "
set +e
-# function is expected to fail and exit, running it
-# in a subprocess to let this script proceed
+# function is expected to trigger warn and continue
(merge_config_group test.conf test9)
VAL=$?
-EXPECT_VAL=255
+EXPECT_VAL=0
check_result "$VAL" "$EXPECT_VAL"
set -e