From 8def175313d8f07797a5f44921255dbf9847b8ee Mon Sep 17 00:00:00 2001 From: phanes Date: Sun, 23 Jan 2022 04:47:15 -0500 Subject: [PATCH] various interpolation fixes --- Rex.cpp | 3 +++ src/loaders/abstract/Conf.cpp | 3 --- src/loaders/abstract/Task.cpp | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/Rex.cpp b/Rex.cpp index 7ce801d..c2a90b4 100644 --- a/Rex.cpp +++ b/Rex.cpp @@ -146,6 +146,9 @@ int main( int argc, char * argv[] ) help_flag = true; } + interpolate( config_path ); + interpolate( plan_path ); + // if the user wants the help screen, just show it and leave if ( (help_flag) | (! config_flag) | (! plan_flag) ) { diff --git a/src/loaders/abstract/Conf.cpp b/src/loaders/abstract/Conf.cpp index 62e04c6..1473dfa 100644 --- a/src/loaders/abstract/Conf.cpp +++ b/src/loaders/abstract/Conf.cpp @@ -73,7 +73,6 @@ Conf::Conf(std::string filename, int LOG_LEVEL ): JSON_Loader(LOG_LEVEL ), slog( std::string jval_s; bool jval_b; - // prepare context spaghetti this->override_context = false; @@ -119,8 +118,6 @@ Conf::Conf(std::string filename, int LOG_LEVEL ): JSON_Loader(LOG_LEVEL ), slog( } jval_s = {0}; - - }; /// Conf::has_context_override - Specifies whether or not the override context function is enabled in the Conf file. diff --git a/src/loaders/abstract/Task.cpp b/src/loaders/abstract/Task.cpp index 376c7d2..06d8b6e 100644 --- a/src/loaders/abstract/Task.cpp +++ b/src/loaders/abstract/Task.cpp @@ -185,7 +185,7 @@ void Task::execute( Conf * configuration ) // END PREWORK // get the target execution command - std::string target_command = this->definition.get_target(); + std::string target_command = configuration->get_execution_context() + "/" + this->definition.get_target(); // check if context override if ( configuration->has_context_override() ) @@ -206,7 +206,7 @@ void Task::execute( Conf * configuration ) int space_index = target_command.find( delimiter ); std::string bin_path = target_command.substr( 0, space_index ); - if ( exists( bin_path ) ) + if ( exists( bin_path ) ) { this->slog.log( E_DEBUG, "[ '" + task_name + "' ] Target executable found."); } else {