[gnome-builder/wip/gtk4-port] plugins/jhbuild: actually test for program in path
- From: Christian Hergert <chergert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-builder/wip/gtk4-port] plugins/jhbuild: actually test for program in path
- Date: Tue, 28 Jun 2022 20:44:48 +0000 (UTC)
commit fb2e04c4e1edbbae7dba34ece0994c9f4d8b7882
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]