mirror of
https://github.com/markqvist/NomadNet.git
synced 2025-02-06 02:25:26 -05:00
Fixed missing path in env
This commit is contained in:
parent
2fe2f6bb49
commit
8109bce5a3
@ -153,6 +153,8 @@ class Node:
|
|||||||
RNS.log("Serving page: "+file_path, RNS.LOG_VERBOSE)
|
RNS.log("Serving page: "+file_path, RNS.LOG_VERBOSE)
|
||||||
if os.access(file_path, os.X_OK):
|
if os.access(file_path, os.X_OK):
|
||||||
env_map = {}
|
env_map = {}
|
||||||
|
if "PATH" in os.environ:
|
||||||
|
env_map["PATH"] = os.environ["PATH"]
|
||||||
if link_id != None:
|
if link_id != None:
|
||||||
env_map["link_id"] = RNS.hexrep(link_id, delimit=False)
|
env_map["link_id"] = RNS.hexrep(link_id, delimit=False)
|
||||||
if remote_identity != None:
|
if remote_identity != None:
|
||||||
@ -248,4 +250,4 @@ If you are the node operator, you can define your own home page by creating a fi
|
|||||||
DEFAULT_NOTALLOWED = '''>Request Not Allowed
|
DEFAULT_NOTALLOWED = '''>Request Not Allowed
|
||||||
|
|
||||||
You are not authorised to carry out the request.
|
You are not authorised to carry out the request.
|
||||||
'''
|
'''
|
||||||
|
@ -719,6 +719,10 @@ class Browser:
|
|||||||
env_map = self.request_data
|
env_map = self.request_data
|
||||||
else:
|
else:
|
||||||
env_map = {}
|
env_map = {}
|
||||||
|
|
||||||
|
if "PATH" in os.environ:
|
||||||
|
env_map["PATH"] = os.environ["PATH"]
|
||||||
|
|
||||||
generated = subprocess.run([page_path], stdout=subprocess.PIPE, env=env_map)
|
generated = subprocess.run([page_path], stdout=subprocess.PIPE, env=env_map)
|
||||||
page_data = generated.stdout
|
page_data = generated.stdout
|
||||||
else:
|
else:
|
||||||
@ -1108,4 +1112,4 @@ class UrlEdit(urwid.Edit):
|
|||||||
if key == "enter":
|
if key == "enter":
|
||||||
self.confirmed(self)
|
self.confirmed(self)
|
||||||
else:
|
else:
|
||||||
return super(UrlEdit, self).keypress(size, key)
|
return super(UrlEdit, self).keypress(size, key)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user