This commit is contained in:
Your Name
2025-05-04 22:09:04 +12:00
parent 56184710a7
commit 3460224e29
6 changed files with 44 additions and 39 deletions

View File

@ -110,8 +110,10 @@ int main(int argc, char* argv[]) {
ASSERT_MSG(safearg(argc,argv,1) != "assert", "Hello! Here is an assert.");
try {
// silently attempt to load the config file.
// silently attempt to load the config file and templates.
gConfig().load_config();
if (gConfig().is_config_set())
gTemplateManager().load_sources();
if (argc < 2) {
print_help();
@ -155,9 +157,6 @@ int main(int argc, char* argv[]) {
if (!gConfig().is_config_set())
return die("Please run 'dropshell edit' to set up the dropshell configuration.");
// load the template sources.
gTemplateManager().load_sources();
const std::vector<std::string> & server_definition_paths = gConfig().get_local_server_definition_paths();
if (server_definition_paths.size()>1) { // only show if there are multiple.
std::cout << "Server definition paths: ";
@ -165,6 +164,8 @@ int main(int argc, char* argv[]) {
std::cout << "["<< dir << "] ";
std::cout << std::endl;
}
if (gTemplateManager().is_loaded() && gTemplateManager().get_source_count() > 0)
gTemplateManager().print_sources();
if (cmd == "server" || cmd == "servers" || cmd == "list" || cmd == "view")
switch (argc)