summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexander Larsson <alexl@redhat.com>2016-10-21 12:46:38 +0200
committerAlexander Larsson <alexl@redhat.com>2016-10-21 12:46:38 +0200
commitc3bea6c8fc473ee437da620a8ca68bc79d4cbd00 (patch)
tree0405f9be240953d9faadce15c05569ccc32a1665
parenteb92727f656fac2b142284102ec50851029d3201 (diff)
downloadflatpak-c3bea6c8fc473ee437da620a8ca68bc79d4cbd00.tar.gz
remote-add: Assume --from if location ends with .flatpakrepo
If you try to set the flatpakrepo uri as a repo uri for a new remote things get really confused, so lets try to do the right thing anyway.
-rw-r--r--app/flatpak-builtins-add-remote.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/app/flatpak-builtins-add-remote.c b/app/flatpak-builtins-add-remote.c
index 247c1b07..08963572 100644
--- a/app/flatpak-builtins-add-remote.c
+++ b/app/flatpak-builtins-add-remote.c
@@ -390,7 +390,8 @@ flatpak_builtin_add_remote (int argc, char **argv,
return flatpak_fail (error, _("Remote %s already exists"), remote_name);
}
- if (opt_from)
+ if (opt_from ||
+ g_str_has_suffix (location, ".flatpakrepo"))
{
load_options (location, &gpg_data);
if (opt_url == NULL)