mirror of
https://github.com/flatpak/flatpak.git
synced 2026-03-16 22:19:47 -04:00
remote-add: Verify that GPG is enabled if collections are
Emit an error message if a collection ID is specified but GPG is not enabled, since pulling using collection IDs requires GPG. Signed-off-by: Philip Withnall <withnall@endlessm.com>
This commit is contained in:
committed by
Alexander Larsson
parent
19dbbd5f8c
commit
5c0eef7bde
@@ -330,6 +330,10 @@ flatpak_builtin_add_remote (int argc, char **argv,
|
||||
if (opt_collection_id != NULL &&
|
||||
!ostree_validate_collection_id (opt_collection_id, &local_error))
|
||||
return flatpak_fail (error, _("‘%s’ is not a valid collection ID: %s"), opt_collection_id, local_error->message);
|
||||
|
||||
if (opt_collection_id != NULL &&
|
||||
(opt_no_gpg_verify || opt_gpg_import == NULL || opt_gpg_import[0] == NULL))
|
||||
return flatpak_fail (error, _("GPG verification is required if collections are enabled"));
|
||||
#endif /* FLATPAK_ENABLE_P2P */
|
||||
|
||||
remote_name = argv[1];
|
||||
|
||||
Reference in New Issue
Block a user