From e68fadb27f18dd52c75823f11a941554e0ebad46 Mon Sep 17 00:00:00 2001 From: Guy Sviry Date: Thu, 21 Dec 2023 20:50:00 +0000 Subject: [PATCH] Copy environment and pass it to spawn explicitly Looks like this broke in twisted between 2018 and now who knew --- ilua/kernel.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/ilua/kernel.py b/ilua/kernel.py index 297aa12..263f6d1 100644 --- a/ilua/kernel.py +++ b/ilua/kernel.py @@ -81,6 +81,8 @@ def message_sink(stream, data): 'LUA_PATH': os.environ.get("LUA_PATH", ";") + ";" + LUA_PATH_EXTRA }) + env = os.environ.copy() + assert find_executable(self.lua_interpreter), ("Could not find '{}', " "is Lua in the system " "path?".format( @@ -91,13 +93,13 @@ def message_sink(stream, data): self.lua_process = self.reactor.spawnProcess(proto, None, [self.lua_interpreter, INTERPRETER_SCRIPT], - None) + env) else: self.lua_process = self.reactor.spawnProcess(proto, self.lua_interpreter, [self.lua_interpreter, INTERPRETER_SCRIPT], - None) + env) @defer.inlineCallbacks def do_startup(self):