Compare commits
5 Commits
Examplar-1
...
Examplar-1
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
3517b9cc11 | ||
|
|
137c82ebaa | ||
|
|
e49cc335f3 | ||
|
|
4ea05b842a | ||
|
|
3bc60f56de |
@@ -124,9 +124,9 @@ Conf::Conf( std::string filename, int LOG_LEVEL ): JSON_Loader( LOG_LEVEL ), slo
|
||||
|
||||
this->env_vars_file_literal = this->execution_context_literal + "/" + this->env_vars_file.asString();
|
||||
|
||||
if ( exists( this->env_vars_file_literal ) )
|
||||
if ( exists( this->get_env_vars_file() ) )
|
||||
{
|
||||
this->slog.log( E_DEBUG, "Environment variables file exists: '" + this->env_vars_file_literal + "'." );
|
||||
this->slog.log( E_DEBUG, "Environment variables file exists: '" + this->get_env_vars_file() + "'." );
|
||||
} else {
|
||||
this->slog.log( E_FATAL, "Variables file does not exist: '" + this->env_vars_file_literal + "'.");
|
||||
throw ConfigLoadException( "env_vars_file points to an incorrect path." );
|
||||
|
||||
@@ -184,7 +184,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() )
|
||||
@@ -198,9 +198,9 @@ void Task::execute( Conf * configuration )
|
||||
// a[0] execute target
|
||||
// TODO revise variable sourcing strategy
|
||||
|
||||
this->slog.log( E_DEBUG, "Loading environment variable file: " + configuration->get_env_vars_file() );
|
||||
this->slog.log( E_INFO, "Executing target: \"" + target_command + "\"." );
|
||||
int return_code = Sproc::execute( "source " + configuration->get_env_vars_file() + " && " + target_command );
|
||||
this->slog.log( E_DEBUG, "Vars file: " + configuration->get_env_vars_file() );
|
||||
int return_code = Sproc::execute( ". " + configuration->get_env_vars_file() + " && " + target_command );
|
||||
|
||||
// **********************************************
|
||||
// d[0] Error Code Check
|
||||
|
||||
Reference in New Issue
Block a user