mirror of
https://github.com/flatpak/flatpak.git
synced 2026-04-02 14:27:00 -04:00
oci-authenticator: fix failures to clear GError
Fix problems overwriting a GError when we retry multiple times.
One of these was introduced with the recent change
e3f17a89a flatpak-oci-authenticator: try getting a token without credentials
but the other was existing.
Signed-off-by: Owen W. Taylor <otaylor@fishsoup.net>
(cherry picked from commit 425f628263)
This commit is contained in:
committed by
Alexander Larsson
parent
f4f387a509
commit
53142f3d6a
@@ -496,6 +496,8 @@ handle_request_ref_tokens (FlatpakAuthenticator *authenticator,
|
||||
first_token = get_token_for_ref (registry, ref_data, NULL, &error);
|
||||
if (first_token != NULL)
|
||||
have_auth = TRUE;
|
||||
else
|
||||
g_clear_error (&error);
|
||||
}
|
||||
|
||||
/* Prompt the user for credentials */
|
||||
@@ -520,6 +522,11 @@ handle_request_ref_tokens (FlatpakAuthenticator *authenticator,
|
||||
auth = g_steal_pointer (&test_auth);
|
||||
have_auth = TRUE;
|
||||
}
|
||||
else
|
||||
{
|
||||
g_debug ("Failed to get token: %s", error->message);
|
||||
g_clear_error (&error);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user