[gnome-builder] plugins/podman: ignore stderr/stdout when running which



commit 3d3e746a4af356bfe8a8eae2b87ccc634f1433ef
Author: Christian Hergert <chergert redhat com>
Date:   Thu Jul 28 11:18:13 2022 -0700

    plugins/podman: ignore stderr/stdout when running which

 src/plugins/podman/gbp-podman-runtime.c | 4 ++++
 1 file changed, 4 insertions(+)
---
diff --git a/src/plugins/podman/gbp-podman-runtime.c b/src/plugins/podman/gbp-podman-runtime.c
index 29ecb6dbe..eb5866924 100644
--- a/src/plugins/podman/gbp-podman-runtime.c
+++ b/src/plugins/podman/gbp-podman-runtime.c
@@ -185,6 +185,10 @@ gbp_podman_runtime_contains_program_in_path (IdeRuntime   *runtime,
   ide_run_context_append_argv (run_context, "which");
   ide_run_context_append_argv (run_context, program);
 
+  /* Ignore stdout/stderr */
+  ide_run_context_take_fd (run_context, -1, STDOUT_FILENO);
+  ide_run_context_take_fd (run_context, -1, STDERR_FILENO);
+
   if (!(subprocess = ide_run_context_spawn (run_context, NULL)))
     IDE_RETURN (FALSE);
 


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