Pass $HOME and $PATH through to scripts in modules/scripts.py

This commit is contained in:
jesopo 2018-10-07 11:24:00 +01:00
parent 02c3a5c336
commit af39136f83

View file

@ -31,7 +31,11 @@ class Module(object):
event["stdout"].write("Reloaded all scripts") event["stdout"].write("Reloaded all scripts")
def call(self, event, filename, name): def call(self, event, filename, name):
env = {} env = {
"HOME": os.environ["HOME"],
"PATH": os.environ["PATH"]
}
env["EVENT"] = event.name env["EVENT"] = event.name
for key, value in event.kwargs.items(): for key, value in event.kwargs.items():
if isinstance(value, (str,)): if isinstance(value, (str,)):