[gnome-builder] terminal: always set error string if shell discovery fails
- From: Christian Hergert <chergert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-builder] terminal: always set error string if shell discovery fails
- Date: Fri, 16 Sep 2016 19:56:00 +0000 (UTC)
commit f7238333c8879dbe6402db4d1a13f4b3a10e865a
Author: Christian Hergert <chergert redhat com>
Date: Fri Sep 16 12:51:21 2016 -0700
terminal: always set error string if shell discovery fails
plugins/terminal/gb-terminal-view.c | 6 ++++++
1 files changed, 6 insertions(+), 0 deletions(-)
---
diff --git a/plugins/terminal/gb-terminal-view.c b/plugins/terminal/gb-terminal-view.c
index 3aeaa9a..04d972d 100644
--- a/plugins/terminal/gb-terminal-view.c
+++ b/plugins/terminal/gb-terminal-view.c
@@ -117,6 +117,12 @@ gb_terminal_view_discover_shell (GCancellable *cancellable,
cached_shell = g_steal_pointer (&stdout_buf);
}
+ if (cached_shell == NULL)
+ g_set_error_literal (error,
+ G_IO_ERROR,
+ G_IO_ERROR_FAILED,
+ "Unknown error when discovering user shell");
+
return cached_shell;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]