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 {