diff options
Diffstat (limited to 'src/sdp/meta/read_config_files.d')
-rw-r--r-- | src/sdp/meta/read_config_files.d | 24 |
1 files changed, 16 insertions, 8 deletions
diff --git a/src/sdp/meta/read_config_files.d b/src/sdp/meta/read_config_files.d index 57aba7f..52446e8 100644 --- a/src/sdp/meta/read_config_files.d +++ b/src/sdp/meta/read_config_files.d @@ -12,9 +12,13 @@ static template configInSite() { std.path; final string configInSite(M,E)(M manifest, E env) { auto conf_file_details = ConfigFilePaths!()(manifest, env); - string conf_sdl = conf_file_details.config_filename_site; - auto possible_config_path_locations = conf_file_details.possible_config_path_locations_local_site; + string conf_sdl = conf_file_details.possible_config_path_locations.config_filename_site; + auto possible_config_path_locations = conf_file_details.possible_config_path_locations.local_site; string config_file_str; + debug(io) { + writeln("in config filename: ", conf_sdl); + writeln("in config possible path locations: ", possible_config_path_locations); + } foreach(pth; possible_config_path_locations) { auto conf_file = asNormalizedPath(chainPath(to!string(pth), conf_sdl)).array; if (config_file_str.length > 0) { @@ -22,8 +26,8 @@ static template configInSite() { } try { if (exists(conf_file)) { - debug(configfile) { - writeln(conf_file); + debug(io) { + writeln("in config file found: ", conf_file); } config_file_str = conf_file.readText; break; @@ -46,8 +50,12 @@ static template configInDoc() { final string configInDoc(M,E)(M manifest, E env) { auto conf_file_details = ConfigFilePaths!()(manifest, env); string conf_sdl = conf_file_details.config_filename_document; - auto possible_config_path_locations = conf_file_details.possible_config_path_locations_document; + auto possible_config_path_locations = conf_file_details.possible_config_path_locations.document; string config_file_str; + debug(io) { + writeln("in config filename: ", conf_sdl); + writeln("in config possible path locations: ", possible_config_path_locations); + } foreach(pth; possible_config_path_locations) { auto conf_file = asNormalizedPath(chainPath(to!string(pth), conf_sdl)).array; if (config_file_str.length > 0) { @@ -55,8 +63,8 @@ static template configInDoc() { } try { if (exists(conf_file)) { - debug(configfile) { - writeln(conf_file); + debug(io) { + writeln("in config file found: ", conf_file); } config_file_str = conf_file.readText; break; @@ -104,7 +112,7 @@ static template configReadSite() { final auto configReadSite(M,E)(M manifest, E env) { auto configuration = configInSite!()(manifest, env); auto conf_file_details = ConfigFilePaths!()(manifest, env); - string conf_sdl = conf_file_details.config_filename_site; + string conf_sdl = conf_file_details.possible_config_path_locations.config_filename_site; auto sdl_root = ConfigSDLang!()(configuration, conf_sdl); return sdl_root; } |