Fixed missing path in env

This commit is contained in:
Mark Qvist 2023-02-17 23:04:44 +01:00
parent 2fe2f6bb49
commit 8109bce5a3
2 changed files with 8 additions and 2 deletions

View File

@ -153,6 +153,8 @@ class Node:
RNS.log("Serving page: "+file_path, RNS.LOG_VERBOSE)
if os.access(file_path, os.X_OK):
env_map = {}
if "PATH" in os.environ:
env_map["PATH"] = os.environ["PATH"]
if link_id != None:
env_map["link_id"] = RNS.hexrep(link_id, delimit=False)
if remote_identity != None:

View File

@ -719,6 +719,10 @@ class Browser:
env_map = self.request_data
else:
env_map = {}
if "PATH" in os.environ:
env_map["PATH"] = os.environ["PATH"]
generated = subprocess.run([page_path], stdout=subprocess.PIPE, env=env_map)
page_data = generated.stdout
else: