[gnome-builder] runtime: setup some defaults



commit 0d0166b76cfdae480b18b4bdf9abef0f74c9cc64
Author: Christian Hergert <chergert redhat com>
Date:   Wed Sep 14 01:20:42 2016 -0700

    runtime: setup some defaults
    
    Our default runtime launcher should run on the host, since that is what
    it's name says it does. Other runtimes should override this if they
    chain up to this method.

 libide/runtimes/ide-runtime.c |   13 +++++++++++++
 1 files changed, 13 insertions(+), 0 deletions(-)
---
diff --git a/libide/runtimes/ide-runtime.c b/libide/runtimes/ide-runtime.c
index 0d5ba61..bf64e6c 100644
--- a/libide/runtimes/ide-runtime.c
+++ b/libide/runtimes/ide-runtime.c
@@ -107,6 +107,19 @@ ide_runtime_real_create_launcher (IdeRuntime  *self,
 
   ret = ide_subprocess_launcher_new (G_SUBPROCESS_FLAGS_STDOUT_PIPE | G_SUBPROCESS_FLAGS_STDERR_PIPE);
 
+  if (ret != NULL)
+    {
+      ide_subprocess_launcher_set_run_on_host (ret, TRUE);
+      ide_subprocess_launcher_set_clear_env (ret, FALSE);
+    }
+  else
+    {
+      g_set_error (error,
+                   G_IO_ERROR,
+                   G_IO_ERROR_FAILED,
+                   "An unknown error ocurred");
+    }
+
   IDE_RETURN (ret);
 }
 


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