[gnome-builder] terminal: add warning when shell discovery fails



commit fefd6c02a36bddd658dc3d2eafa5461d390b4fe8
Author: Christian Hergert <chergert redhat com>
Date:   Fri Sep 16 12:50:09 2016 -0700

    terminal: add warning when shell discovery fails

 plugins/terminal/gb-terminal-view.c |    9 +++++++--
 1 files changed, 7 insertions(+), 2 deletions(-)
---
diff --git a/plugins/terminal/gb-terminal-view.c b/plugins/terminal/gb-terminal-view.c
index 131a236..3aeaa9a 100644
--- a/plugins/terminal/gb-terminal-view.c
+++ b/plugins/terminal/gb-terminal-view.c
@@ -212,9 +212,14 @@ gb_terminal_respawn (GbTerminalView *self,
   workdir = ide_vcs_get_working_directory (vcs);
   workpath = g_file_get_path (workdir);
 
-  shell = gb_terminal_view_discover_shell (NULL, NULL);
+  shell = gb_terminal_view_discover_shell (NULL, &error);
+
   if (shell == NULL)
-    shell = vte_get_user_shell ();
+    {
+      g_warning ("Failed to discover user shell: %s", error->message);
+      g_clear_error (&error);
+      shell = vte_get_user_shell ();
+    }
 
   args = g_ptr_array_new ();
   g_ptr_array_add (args, (gchar *)shell);


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]