[gnome-builder/wip/gtk4-port] libide/terminal: dont always add minimal environment



commit 7f3434a1253901221ea9c2a5b461a267df4ebf54
Author: Christian Hergert <chergert redhat com>
Date:   Tue Jun 28 03:39:42 2022 -0700

    libide/terminal: dont always add minimal environment
    
    We don't want this in some cases, like with pipeline. The runtime version
    will add it in lower layers now.

 src/libide/terminal/ide-terminal-run-command.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/src/libide/terminal/ide-terminal-run-command.c b/src/libide/terminal/ide-terminal-run-command.c
index 75753d669..03cbe65d3 100644
--- a/src/libide/terminal/ide-terminal-run-command.c
+++ b/src/libide/terminal/ide-terminal-run-command.c
@@ -55,12 +55,14 @@ ide_terminal_run_command_prepare_to_run (IdeRunCommand *run_command,
     {
     case IDE_TERMINAL_RUN_ON_HOST:
       ide_run_context_push_host (run_context);
+      ide_run_context_add_minimal_environment (run_context);
       ide_run_context_append_argv (run_context, user_shell);
       if (ide_shell_supports_dash_login (user_shell))
         ide_run_context_append_argv (run_context, "--login");
       break;
 
     case IDE_TERMINAL_RUN_AS_SUBPROCESS:
+      ide_run_context_add_minimal_environment (run_context);
       if (g_find_program_in_path (user_shell))
         {
           ide_run_context_append_argv (run_context, user_shell);
@@ -112,8 +114,6 @@ ide_terminal_run_command_prepare_to_run (IdeRunCommand *run_command,
       g_assert_not_reached ();
     }
 
-  ide_run_context_add_minimal_environment (run_context);
-
   IDE_RUN_COMMAND_CLASS (ide_terminal_run_command_parent_class)->prepare_to_run (run_command, run_context, 
context);
 
   IDE_EXIT;


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