From 035ee868ae2d9cbbf2a290ca3412946fade20833 Mon Sep 17 00:00:00 2001 From: James McCoy Date: Sun, 31 Jan 2021 07:49:31 -0500 Subject: [PATCH] fix(pty_proc/macOS): Properly set the environment for the child Binding _NSGetEnviron()'s return value to a local variable and then re-binding that is incorrect. We need to directly update what _NSGetEnviron() refers to. --- src/nvim/os/pty_process_unix.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/nvim/os/pty_process_unix.c b/src/nvim/os/pty_process_unix.c index 0733589870..348a139e79 100644 --- a/src/nvim/os/pty_process_unix.c +++ b/src/nvim/os/pty_process_unix.c @@ -159,7 +159,7 @@ static void init_child(PtyProcess *ptyproc) FUNC_ATTR_NONNULL_ALL { #if defined(HAVE__NSGETENVIRON) - char **environ = *_NSGetEnviron(); +#define environ (*_NSGetEnviron()) #else extern char **environ; #endif