add support for doltcfg.d/ sql-server yaml

This commit is contained in:
elianddb
2025-11-10 11:22:14 -05:00
parent e1e8251b27
commit 5d8ee7fc40
2 changed files with 33 additions and 3 deletions
+13 -3
View File
@@ -392,9 +392,19 @@ _main() {
set_dolt_config_if_defined
# if there is a single yaml provided in /etc/dolt/servercfg.d directory,
# it will be used to start the server with --config flag
get_config_file_path_if_exists "$SERVER_CONFIG_DIR" "yaml"
if [ ! -z "$CONFIG_PROVIDED" ]; then
# it will be used to start the server with --config flag.
get_config_file_path_if_exists "$DOLT_CONFIG_DIR" "yaml"
if [ -z "$CONFIG_PROVIDED" ]; then
get_config_file_path_if_exists "$DOLT_CONFIG_DIR" "yml"
fi
if [ -z "$CONFIG_PROVIDED" ]; then
get_config_file_path_if_exists "$SERVER_CONFIG_DIR" "yaml"
if [ -z "$CONFIG_PROVIDED" ]; then
get_config_file_path_if_exists "$SERVER_CONFIG_DIR" "yml"
fi
fi
if [ -n "$CONFIG_PROVIDED" ]; then
set -- "$@" --config="$CONFIG_PROVIDED"
fi