[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
This commit is contained in:
parent
5936740b95
commit
4d04b148d8
|
|
@ -126,15 +126,10 @@ ot_admin_builtin_switch (int argc, char **argv, OstreeSysroot *sysroot, GCancell
|
||||||
if (console)
|
if (console)
|
||||||
{
|
{
|
||||||
gs_console_begin_status_line (console, "", NULL, NULL);
|
gs_console_begin_status_line (console, "", NULL, NULL);
|
||||||
|
in_status_line = TRUE;
|
||||||
progress = ostree_async_progress_new_and_connect (ot_common_pull_progress, console);
|
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
|
/* Always allow older...there's not going to be a chronological
|
||||||
* relationship necessarily.
|
* relationship necessarily.
|
||||||
*/
|
*/
|
||||||
|
|
@ -144,6 +139,12 @@ ot_admin_builtin_switch (int argc, char **argv, OstreeSysroot *sysroot, GCancell
|
||||||
cancellable, error))
|
cancellable, error))
|
||||||
goto out;
|
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))
|
if (!ostree_sysroot_upgrader_deploy (upgrader, cancellable, error))
|
||||||
goto out;
|
goto out;
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue