diff options
author | OpenGnSys Support Team <soporte-og@soleta.eu> | 2024-06-21 14:10:13 +0200 |
---|---|---|
committer | OpenGnSys Support Team <soporte-og@soleta.eu> | 2024-06-21 14:12:02 +0200 |
commit | 12d5caf6a6af5cb4870d375e185341909fc61b7e (patch) | |
tree | 11809851babe6041b5705447e9e53f876bcaf7a7 /src/rest.c | |
parent | 98fab52b74ea9cbf7bdac7a022504fc6be90be88 (diff) |
rest: add retcode to shell/output
Add retcode field to specify return code of shell invocation.
Diffstat (limited to 'src/rest.c')
-rw-r--r-- | src/rest.c | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -797,13 +797,14 @@ static int og_cmd_run_get(json_t *element, struct og_msg_params *params, } json_object_set_new(object, "addr", addr); - output = json_string(cli->shell_output); + output = json_string(cli->shell.output); if (!output) { json_decref(object); json_decref(array); return -1; } json_object_set_new(object, "output", output); + json_object_set_new(object, "retcode", json_integer(cli->shell.retcode)); json_array_append_new(array, object); } |