diff options
author | Colin Walters <walters@verbum.org> | 2014-06-21 17:35:03 -0400 |
---|---|---|
committer | Colin Walters <walters@verbum.org> | 2014-06-21 18:08:49 -0400 |
commit | 4d04b148d8b6abad6b6ebc2685e67fc9421b308f (patch) | |
tree | f157d14ae29fdb51507a58914c1c84c1a9d43e39 | |
parent | 5936740b95729d28bf6c940d5dd6dfd68420b961 (diff) | |
download | ostree-4d04b148d8b6abad6b6ebc2685e67fc9421b308f.tar.gz |
[staticanalysis]: Fix in_status_line
We need to end the status line *after* we've done a pull, as ostree
admin upgrade does. Also add the correct in_status_line assignment.
https://bugzilla.gnome.org/show_bug.cgi?id=732020
-rw-r--r-- | src/ostree/ot-admin-builtin-switch.c | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/src/ostree/ot-admin-builtin-switch.c b/src/ostree/ot-admin-builtin-switch.c index 44861e52..a6a18626 100644 --- a/src/ostree/ot-admin-builtin-switch.c +++ b/src/ostree/ot-admin-builtin-switch.c @@ -126,15 +126,10 @@ ot_admin_builtin_switch (int argc, char **argv, OstreeSysroot *sysroot, GCancell if (console) { gs_console_begin_status_line (console, "", NULL, NULL); + in_status_line = TRUE; progress = ostree_async_progress_new_and_connect (ot_common_pull_progress, console); } - if (in_status_line) - { - gs_console_end_status_line (console, NULL, NULL); - in_status_line = FALSE; - } - /* Always allow older...there's not going to be a chronological * relationship necessarily. */ @@ -144,6 +139,12 @@ ot_admin_builtin_switch (int argc, char **argv, OstreeSysroot *sysroot, GCancell cancellable, error)) goto out; + if (in_status_line) + { + gs_console_end_status_line (console, NULL, NULL); + in_status_line = FALSE; + } + if (!ostree_sysroot_upgrader_deploy (upgrader, cancellable, error)) goto out; |