[gnome-builder] terminal: Add INSIDE_GNOME_BUILDER



commit 7571e6d358ae643b02a0032905fc79cd81969e8e
Author: Garrett Regier <garrettregier gmail com>
Date:   Thu Sep 15 21:38:16 2016 -0700

    terminal: Add INSIDE_GNOME_BUILDER
    
    This allows programs to detect when running
    inside Builder and perform version checks.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=769792

 plugins/terminal/gb-terminal-view.c |    5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)
---
diff --git a/plugins/terminal/gb-terminal-view.c b/plugins/terminal/gb-terminal-view.c
index cfce000..b5aa9d4 100644
--- a/plugins/terminal/gb-terminal-view.c
+++ b/plugins/terminal/gb-terminal-view.c
@@ -16,6 +16,10 @@
  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
  */
 
+#ifdef HAVE_CONFIG_H
+# include "config.h"
+#endif
+
 #include <fcntl.h>
 #include <glib/gi18n.h>
 #include <ide.h>
@@ -202,6 +206,7 @@ gb_terminal_respawn (GbTerminalView *self,
   ide_subprocess_launcher_take_stdout_fd (launcher, dup (tty_fd));
   ide_subprocess_launcher_take_stderr_fd (launcher, dup (tty_fd));
   ide_subprocess_launcher_setenv (launcher, "TERM", "xterm-256color", TRUE);
+  ide_subprocess_launcher_setenv (launcher, "INSIDE_GNOME_BUILDER", PACKAGE_VERSION, TRUE);
 
   subprocess = ide_subprocess_launcher_spawn_sync (launcher, NULL, &error);
   if (subprocess == NULL)


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