aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/doc_reform/io_in/read_config_files.d
diff options
context:
space:
mode:
Diffstat (limited to 'src/doc_reform/io_in/read_config_files.d')
-rw-r--r--src/doc_reform/io_in/read_config_files.d13
1 files changed, 8 insertions, 5 deletions
diff --git a/src/doc_reform/io_in/read_config_files.d b/src/doc_reform/io_in/read_config_files.d
index 69c2f55..9180c20 100644
--- a/src/doc_reform/io_in/read_config_files.d
+++ b/src/doc_reform/io_in/read_config_files.d
@@ -12,7 +12,7 @@ import
doc_reform.meta.rgx;
template readConfigSite() {
- @system final auto readConfigSite(C)(C _conf_file_details) {
+ @system final auto readConfigSite(C,O)(C _conf_file_details, O _opt_action) {
mixin spineRgxIn;
static auto rgx = RgxI();
string conf_filename = "NONE";
@@ -70,6 +70,9 @@ webserv:
try {
if (exists(conf_file)) {
if (conf_file.getLinkAttributes.attrIsFile) {
+ if (_opt_action.verbose || _opt_action.very_verbose || _opt_action.debug_do) {
+ writeln("config file used: \"", conf_file, "\" (cli flag settings override config file's individual settings)");
+ }
config_file_str = conf_file.readText;
break;
}
@@ -93,7 +96,7 @@ webserv:
config_file_str = default_config_file_str;
}
}
- if (config_file_str.length == 0) { /+ create dummy default config file +/
+ if (config_file_str.length == 0) { /+ use dummy default config file +/
writeln("WARNING config file NOT found, default provided");
conf_filename = "VIRTUAL";
config_file_str = default_config_file_str;
@@ -128,7 +131,7 @@ static template readConfigDoc() {
static auto rgx = RgxI();
string config_file_str;
string conf_filename = "NONE";
- auto _conf_file_details = ConfigFilePaths!()(_manifested, _env);
+ auto _conf_file_details = configFilePaths!()(_manifested, _env);
string[] possible_config_path_locations = _conf_file_details.possible_config_path_locations.dr_document_make;
foreach(conf_fn; [_conf_file_details.config_filename_document]) {
foreach(pth; possible_config_path_locations) {
@@ -176,7 +179,7 @@ static template configReadSiteYAML() {
doc_reform.io_in.paths_source;
@safe final YAMLDocument configReadSiteYAML(M,E)(M _manifested, E _env) {
string _configuration = configReadInSiteYAML!()(_manifested, _env);
- auto _conf_file_details = ConfigFilePaths!()(_manifested, _env);
+ auto _conf_file_details = configFilePaths!()(_manifested, _env);
string _conf_yaml_fn = _conf_file_details.config_filename_site;
YAMLDocument _yaml_conf = configYAML!()(_configuration, _conf_yaml_fn);
return _yaml_conf;
@@ -190,7 +193,7 @@ static template configReadDocYAML() {
doc_reform.io_in.paths_source;
@safe final YAMLDocument configReadDocYAML(M,E)(M _manifested, E _env) {
string _configuration = configReadInDocYAML!()(_manifested, _env);
- auto _conf_file_details = ConfigFilePaths!()(_manifested, _env);
+ auto _conf_file_details = configFilePaths!()(_manifested, _env);
string _conf_yaml_fn = _conf_file_details.config_filename_document;
YAMLDocument _yaml_conf = configYAML!()(_configuration, _conf_yaml_fn);
return _yaml_conf;