From e877e9c3180455217c231a50a3c0753ea2a1c5e4 Mon Sep 17 00:00:00 2001 From: Joseph Hunkeler Date: Mon, 22 Jun 2026 00:24:12 -0400 Subject: BUGFIX: env_manipulate_pathstr PM_ONCE logic did opposite of what was intended * When strstr finds the path in the system path, it's supposed to free the new system path and exit. In this case it was freeing the path when the path wasn't found that lead to several instances of PATH not being updated correctly --- src/lib/core/utils.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lib/core/utils.c b/src/lib/core/utils.c index 152c5c5..4313f2d 100644 --- a/src/lib/core/utils.c +++ b/src/lib/core/utils.c @@ -920,7 +920,7 @@ int env_manipulate_pathstr(const char *key, char *path, int mode) { } if (mode & PM_ONCE) { - if (!strstr(system_path_old, path)) { + if (strstr(system_path_old, path)) { guard_free(system_path_new); return 0; } -- cgit