Skip to content

Commit

Permalink
main: Move cancellable creation later
Browse files Browse the repository at this point in the history
We should only be calling into GIO once we've set our preparatory
environment variables etc.  Not fixing anything today that I know
of, just noticed while looking at the code.

Closes: #1763
Approved by: jlebon
  • Loading branch information
cgwalters authored and rh-atomic-bot committed Feb 25, 2019
1 parent 13e4976 commit a2044f8
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/app/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -391,7 +391,6 @@ int
main (int argc,
char **argv)
{
GCancellable *cancellable = g_cancellable_new ();
RpmOstreeCommand *command;
const char *command_name = NULL;
g_autofree char *prgname = NULL;
Expand All @@ -417,6 +416,8 @@ main (int argc,

setlocale (LC_ALL, "");

GCancellable *cancellable = g_cancellable_new ();

/*
* Parse the global options. We rearrange the options as
* necessary, in order to pass relevant options through
Expand Down

0 comments on commit a2044f8

Please sign in to comment.