[gnome-builder/gnome-builder-43] plugins/host: use preferred shell on host



commit 2865fa6edae63f481585d6040bcac390a6f5700b
Author: Christian Hergert <chergert redhat com>
Date:   Tue Sep 27 15:03:23 2022 -0700

    plugins/host: use preferred shell on host
    
    We want things to run through the users preferred shell on the host,
    because that is how they'd run the commands themselves. This also helps
    in cases that we wouldn't otherwise inherit paths that might be set in
    .bashrc or similar.

 src/plugins/host/gbp-host-runtime.c | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)
---
diff --git a/src/plugins/host/gbp-host-runtime.c b/src/plugins/host/gbp-host-runtime.c
index 3ecb085c5..f09c33b91 100644
--- a/src/plugins/host/gbp-host-runtime.c
+++ b/src/plugins/host/gbp-host-runtime.c
@@ -22,6 +22,8 @@
 
 #include "config.h"
 
+#include "ide-run-context-private.h"
+
 #include "gbp-host-runtime.h"
 
 struct _GbpHostRuntime
@@ -58,7 +60,7 @@ gbp_host_runtime_flatpak_contains_program_in_path (IdeRuntime   *runtime,
   run_context = ide_run_context_new ();
   ide_run_context_push_host (run_context);
   ide_run_context_add_minimal_environment (run_context);
-  ide_run_context_push_shell (run_context, TRUE);
+  _ide_run_context_push_user_shell (run_context, TRUE);
   ide_run_context_append_argv (run_context, "which");
   ide_run_context_append_argv (run_context, program);
 
@@ -87,7 +89,7 @@ gbp_host_runtime_prepare_to_build (IdeRuntime    *runtime,
 
   ide_run_context_push_host (run_context);
   ide_run_context_add_minimal_environment (run_context);
-  ide_run_context_push_shell (run_context, TRUE);
+  _ide_run_context_push_user_shell (run_context, TRUE);
 
   IDE_EXIT;
 }
@@ -109,7 +111,7 @@ gbp_host_runtime_prepare_to_run (IdeRuntime    *runtime,
 
   ide_run_context_push_host (run_context);
   ide_run_context_add_minimal_environment (run_context);
-  ide_run_context_push_shell (run_context, TRUE);
+  _ide_run_context_push_user_shell (run_context, TRUE);
 
   config = ide_pipeline_get_config (pipeline);
   prefix = ide_config_get_prefix (config);


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