[gnome-software] snap: Launch command line snaps with 'snap run'.
- From: Kalev Lember <klember src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-software] snap: Launch command line snaps with 'snap run'.
- Date: Fri, 9 Mar 2018 08:58:44 +0000 (UTC)
commit 68bea8819361d39fabe8f962108dcc98890f7815
Author: Robert Ancell <robert ancell canonical com>
Date: Fri Mar 9 07:07:46 2018 +0100
snap: Launch command line snaps with 'snap run'.
The previous use of the hard-coded /snap directory failed on systems
like Fedora that don't use this directory.
plugins/snap/gs-plugin-snap.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
---
diff --git a/plugins/snap/gs-plugin-snap.c b/plugins/snap/gs-plugin-snap.c
index 5591d6ee..a4b8c1dd 100644
--- a/plugins/snap/gs-plugin-snap.c
+++ b/plugins/snap/gs-plugin-snap.c
@@ -954,17 +954,17 @@ gs_plugin_launch (GsPlugin *plugin,
if (launch_desktop) {
info = (GAppInfo *)g_desktop_app_info_new_from_filename (launch_desktop);
} else {
- g_autofree gchar *binary_name = NULL;
+ g_autofree gchar *commandline = NULL;
GAppInfoCreateFlags flags = G_APP_INFO_CREATE_NONE;
if (g_strcmp0 (launch_name, gs_app_get_id (app)) == 0)
- binary_name = g_strdup_printf ("/snap/bin/%s", launch_name);
+ commandline = g_strdup_printf ("snap run %s", launch_name);
else
- binary_name = g_strdup_printf ("/snap/bin/%s.%s", gs_app_get_id (app), launch_name);
+ commandline = g_strdup_printf ("snap run %s.%s", gs_app_get_id (app), launch_name);
if (!is_graphical (plugin, app, cancellable))
flags |= G_APP_INFO_CREATE_NEEDS_TERMINAL;
- info = g_app_info_create_from_commandline (binary_name, NULL, flags, error);
+ info = g_app_info_create_from_commandline (commandline, NULL, flags, error);
}
if (info == NULL)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]