From a84b2cd980ddd673cddd1520ed1b0820f5897f10 Mon Sep 17 00:00:00 2001 From: Scoopta Date: Sun, 19 Jan 2020 14:55:43 -0800 Subject: [PATCH] drun no longer ignores the error when launching --- modes/drun.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/modes/drun.c b/modes/drun.c index 3ebcbad..97ab66a 100644 --- a/modes/drun.c +++ b/modes/drun.c @@ -306,13 +306,17 @@ struct widget* wofi_drun_get_widget() { } static void launch_done(GObject* obj, GAsyncResult* result, gpointer data) { - if(g_app_info_launch_uris_finish(G_APP_INFO(obj), result, NULL)) { + GError* err = NULL; + if(g_app_info_launch_uris_finish(G_APP_INFO(obj), result, &err)) { exit(0); + } else if(err != NULL) { + char* cmd = data; + fprintf(stderr, "%s cannot be executed: %s\n", cmd, err->message); } else { char* cmd = data; fprintf(stderr, "%s cannot be executed\n", cmd); - exit(1); } + exit(1); } void wofi_drun_exec(const gchar* cmd) {