mirror of
https://github.com/Ylianst/MeshAgent
synced 2025-12-14 07:13:37 +00:00
Fixed bug, where returned value has trailing whitepsace
This commit is contained in:
@@ -88,11 +88,11 @@ function sessionDispatch(tsid, parent, method, args)
|
|||||||
child.waitExit();
|
child.waitExit();
|
||||||
if (child.exitCode == 0)
|
if (child.exitCode == 0)
|
||||||
{
|
{
|
||||||
return (child.stdout.str); // If the return code was 0, then relay the response from stdout
|
return (child.stdout.str.trim()); // If the return code was 0, then relay the response from stdout
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
throw (child.stdout.str); // If the return code was nonzero, then the stdout response is the exception that should be bubbled
|
throw (child.stdout.str.trim()); // If the return code was nonzero, then the stdout response is the exception that should be bubbled
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user