[gnome-builder/wip/gtk4-port: 1710/1774] plugins/jhbuild: actually test for program in path




commit 854389c978c90f1d0b219811ae760c67de69b293
Author: Christian Hergert <chergert redhat com>
Date:   Tue Jun 28 13:34:39 2022 -0700

    plugins/jhbuild: actually test for program in path

 src/plugins/jhbuild/gbp-jhbuild-runtime.c | 5 +++++
 1 file changed, 5 insertions(+)
---
diff --git a/src/plugins/jhbuild/gbp-jhbuild-runtime.c b/src/plugins/jhbuild/gbp-jhbuild-runtime.c
index b636bc473..fd919a2f3 100644
--- a/src/plugins/jhbuild/gbp-jhbuild-runtime.c
+++ b/src/plugins/jhbuild/gbp-jhbuild-runtime.c
@@ -154,6 +154,11 @@ gbp_jhbuild_runtime_contains_program_in_path (IdeRuntime   *runtime,
                         g_object_ref (self),
                         g_object_unref);
 
+  /* Will use /bin/sh --login -c 'which program' */
+  ide_run_context_push_shell (run_context, TRUE);
+  ide_run_context_append_argv (run_context, "which");
+  ide_run_context_append_argv (run_context, program);
+
   if (!(subprocess = ide_run_context_spawn (run_context, &error)))
     {
       g_warning ("Failed to spawn subprocess: %s", error->message);


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