shell attribute fix

master
phanes 2023-02-16 03:27:16 -05:00
parent c129f72b91
commit 79bc82e365
3 changed files with 6 additions and 5 deletions

View File

@ -231,7 +231,7 @@ void Conf::load_shells() {
{
tmp_S.load_root( jbuff[index] );
this->shells.push_back( tmp_S );
this->slog.log_task( E_DEBUG, "SHELLS", "Loaded shell: '" + tmp_S.name + "'" );
this->slog.log_task( E_DEBUG, "SHELLS", "Loaded shell: '" + tmp_S.name + "' (" + tmp_S.path + ")" );
}
}

View File

@ -16,7 +16,8 @@ std::string prefix_generator(
prefix = shell_path;
// if the shell takes an argument to execute a command, add it enclosed in quotes
if (shell_execution_arg != "") {
if ( shell_execution_arg != "" )
{
// add the execution arg
prefix += " " + shell_execution_arg + " ";
} else {

View File

@ -54,11 +54,11 @@ int Shell::load_root( Json::Value loader_root )
throw ShellException("No execution_arg attribute specified when loading a shell definition.");
}
if ( loader_root.isMember("execution_arg") )
if ( loader_root.isMember("source_cmd") )
{
this->execution_arg = loader_root.get( "execution_arg", errmsg ).asString();
this->source_cmd = loader_root.get( "source_cmd", errmsg ).asString();
} else {
throw ShellException("No execution_arg attribute specified when loading a shell definition.");
throw ShellException("No source_cmd attribute specified when loading a shell definition.");
}
return 0;
}