From c0e9ec540eceb61b795620ef31380555f6dc458d Mon Sep 17 00:00:00 2001 From: Inori Date: Fri, 6 Sep 2019 18:34:53 -0400 Subject: [PATCH] Set $TEMP to $TMPDIR if using fakeapi on macOS/Linux --- binding/binding-mri.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/binding/binding-mri.cpp b/binding/binding-mri.cpp index a4067c0e..a74bd65d 100644 --- a/binding/binding-mri.cpp +++ b/binding/binding-mri.cpp @@ -721,6 +721,11 @@ static void mriBindingExecute() rb_funcall(rb_gv_get("$stdout"), rb_intern("reopen"), 1, iostr); #endif #endif + +#if defined(USE_FAKEAPI) && !defined(__WIN32__) + char *tmpdir = getenv("TMPDIR"); + if (tmpdir) setenv("TEMP", tmpdir, false); +#endif Config &conf = shState->rtData().config;