Skip to content

Commit 035ee86

Browse files
committed
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.
1 parent db734ae commit 035ee86

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/nvim/os/pty_process_unix.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -159,7 +159,7 @@ static void init_child(PtyProcess *ptyproc)
159159
FUNC_ATTR_NONNULL_ALL
160160
{
161161
#if defined(HAVE__NSGETENVIRON)
162-
char **environ = *_NSGetEnviron();
162+
#define environ (*_NSGetEnviron())
163163
#else
164164
extern char **environ;
165165
#endif

0 commit comments

Comments
 (0)