shell attribute fix
parent
c129f72b91
commit
79bc82e365
|
@ -231,7 +231,7 @@ void Conf::load_shells() {
|
||||||
{
|
{
|
||||||
tmp_S.load_root( jbuff[index] );
|
tmp_S.load_root( jbuff[index] );
|
||||||
this->shells.push_back( tmp_S );
|
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 + ")" );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -16,7 +16,8 @@ std::string prefix_generator(
|
||||||
prefix = shell_path;
|
prefix = shell_path;
|
||||||
|
|
||||||
// if the shell takes an argument to execute a command, add it enclosed in quotes
|
// 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
|
// add the execution arg
|
||||||
prefix += " " + shell_execution_arg + " ";
|
prefix += " " + shell_execution_arg + " ";
|
||||||
} else {
|
} else {
|
||||||
|
|
|
@ -54,11 +54,11 @@ int Shell::load_root( Json::Value loader_root )
|
||||||
throw ShellException("No execution_arg attribute specified when loading a shell definition.");
|
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 {
|
} 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;
|
return 0;
|
||||||
}
|
}
|
Loading…
Reference in New Issue