Skip to content

Commit

Permalink
Copy environment and pass it to spawn explicitly
Browse files Browse the repository at this point in the history
Looks like this broke in twisted between 2018 and now who knew
  • Loading branch information
guysv committed Dec 21, 2023
1 parent 05eb181 commit e68fadb
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions ilua/kernel.py
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand All @@ -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):
Expand Down

0 comments on commit e68fadb

Please sign in to comment.