[gnome-builder/wip/gtk4-port: 874/1774] libide/threading: set PATH to user default
- From: Christian Hergert <chergert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-builder/wip/gtk4-port: 874/1774] libide/threading: set PATH to user default
- Date: Mon, 11 Jul 2022 22:31:26 +0000 (UTC)
commit 388955b91b9af57ac54e00e52b88e8f154c1db45
Author: Christian Hergert <chergert redhat com>
Date: Thu May 5 14:51:02 2022 -0700
libide/threading: set PATH to user default
src/libide/threading/ide-subprocess-launcher.c | 5 ++++-
src/tests/meson.build | 2 +-
2 files changed, 5 insertions(+), 2 deletions(-)
---
diff --git a/src/libide/threading/ide-subprocess-launcher.c b/src/libide/threading/ide-subprocess-launcher.c
index 0057d3b01..497c54590 100644
--- a/src/libide/threading/ide-subprocess-launcher.c
+++ b/src/libide/threading/ide-subprocess-launcher.c
@@ -42,6 +42,9 @@
#include "ide-simple-subprocess-private.h"
#include "ide-subprocess-launcher.h"
+/* This comes from libide-io but we need access to it */
+#include "../io/ide-shell.h"
+
#define is_flatpak() (ide_get_process_kind() == IDE_PROCESS_KIND_FLATPAK)
typedef struct
@@ -415,7 +418,7 @@ ide_subprocess_launcher_real_spawn (IdeSubprocessLauncher *self,
* that it can get /app/bin too. Since it chains up to us, we wont
* overwrite PATH in that case (which is what we want).
*/
- ide_subprocess_launcher_setenv (self, "PATH", SAFE_PATH, FALSE);
+ ide_subprocess_launcher_setenv (self, "PATH", ide_get_user_default_path (), FALSE);
ide_subprocess_launcher_setenv (self, "HOME", g_get_home_dir (), FALSE);
ide_subprocess_launcher_setenv (self, "USER", g_get_user_name (), FALSE);
ide_subprocess_launcher_setenv (self, "LANG", g_getenv ("LANG"), FALSE);
diff --git a/src/tests/meson.build b/src/tests/meson.build
index 0fe3011ed..5d5c8cfbe 100644
--- a/src/tests/meson.build
+++ b/src/tests/meson.build
@@ -81,7 +81,7 @@ test('test-task', test_task, env: test_env)
test_subprocess_launcher = executable('test-subprocess-launcher', 'test-subprocess-launcher.c',
c_args: test_cflags,
- dependencies: [ libide_threading_dep ],
+ dependencies: [ libide_threading_dep, libide_io_dep ],
)
test('test-subprocess-launcher', test_subprocess_launcher, env: test_env)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]