summaryrefslogtreecommitdiffstats
path: root/updater/updater.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'updater/updater.cpp')
-rw-r--r--updater/updater.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/updater/updater.cpp b/updater/updater.cpp
index c752ebbf3..47696b80c 100644
--- a/updater/updater.cpp
+++ b/updater/updater.cpp
@@ -151,13 +151,14 @@ int main(int argc, char** argv) {
}
}
- char* result = Evaluate(&state, root);
+ std::string result;
+ bool status = Evaluate(&state, root, &result);
if (have_eio_error) {
fprintf(cmd_pipe, "retry_update\n");
}
- if (result == NULL) {
+ if (!status) {
if (state.errmsg.empty()) {
printf("script aborted (no error message)\n");
fprintf(cmd_pipe, "ui_print script aborted (no error message)\n");
@@ -188,8 +189,7 @@ int main(int argc, char** argv) {
return 7;
} else {
- fprintf(cmd_pipe, "ui_print script succeeded: result was [%s]\n", result);
- free(result);
+ fprintf(cmd_pipe, "ui_print script succeeded: result was [%s]\n", result.c_str());
}
if (updater_info.package_zip) {