pull: Ensure we begin a status line
Otherwise if the operation completes before anything happens, we hit an assertion trying to end a status line when we didn't begin one.
This commit is contained in:
1 parent
091523a3bd
commit
ff2c592ac9
2 files changed
+8
-2
No files matched your search
@@ -110,7 +110,10 @@ ot_admin_builtin_upgrade (int argc, char **argv, OstreeSysroot *sysroot, GCancel
|
|||||||
|
|
||||||
console = gs_console_get ();
|
console = gs_console_get ();
|
||||||
if (console)
|
if (console)
|
||||||
progress = ostree_async_progress_new_and_connect (ot_common_pull_progress, console);
|
{
|
||||||
|
gs_console_begin_status_line (console, "", NULL, NULL);
|
||||||
|
progress = ostree_async_progress_new_and_connect (ot_common_pull_progress, console);
|
||||||
|
}
|
||||||
|
|
||||||
g_print ("Fetching remote %s ref %s\n", origin_remote, origin_ref);
|
g_print ("Fetching remote %s ref %s\n", origin_remote, origin_ref);
|
||||||
|
|
||||||
|
|||||||
@@ -66,7 +66,10 @@ ostree_builtin_pull (int argc, char **argv, OstreeRepo *repo, GCancellable *canc
|
|||||||
|
|
||||||
console = gs_console_get ();
|
console = gs_console_get ();
|
||||||
if (console)
|
if (console)
|
||||||
progress = ostree_async_progress_new_and_connect (ot_common_pull_progress, console);
|
{
|
||||||
|
gs_console_begin_status_line (console, "", NULL, NULL);
|
||||||
|
progress = ostree_async_progress_new_and_connect (ot_common_pull_progress, console);
|
||||||
|
}
|
||||||
|
|
||||||
if (!ostree_repo_pull (repo, remote, refs_to_fetch ? (char**)refs_to_fetch->pdata : NULL,
|
if (!ostree_repo_pull (repo, remote, refs_to_fetch ? (char**)refs_to_fetch->pdata : NULL,
|
||||||
pullflags, progress, cancellable, error))
|
pullflags, progress, cancellable, error))
|
||||||
|
|||||||
Reference in new issue
Block a user