Set $TEMP to $TMPDIR if using fakeapi on macOS/Linux

This commit is contained in:
Inori 2019-09-06 18:34:53 -04:00
parent 8384a5b4ea
commit c0e9ec540e

View file

@ -722,6 +722,11 @@ static void mriBindingExecute()
#endif
#endif
#if defined(USE_FAKEAPI) && !defined(__WIN32__)
char *tmpdir = getenv("TMPDIR");
if (tmpdir) setenv("TEMP", tmpdir, false);
#endif
Config &conf = shState->rtData().config;
if (!conf.rubyLoadpaths.empty())