Update public source

This commit is contained in:
2026-11-19 00:39:35 +03:00
parent 52fef57721
commit 012f209303
2 changed files with 56 additions and 8 deletions
+14 -8
View File
@@ -21,6 +21,7 @@ if str(PROJECT_ROOT) not in sys.path:
sys.path.insert(0, str(PROJECT_ROOT))
from tileserver_config import load_tileserver_config
from runtime_paths import get_node_path, get_runtime_env
TILESERVER_CONFIG_DATA = load_tileserver_config(PROJECT_ROOT)
@@ -129,12 +130,12 @@ def start_tileserver():
"Чужой процесс не будет остановлен."
)
node = shutil.which("node")
if node is None:
try:
node = str(get_node_path())
except FileNotFoundError as error:
raise LifecycleError(
"Node.js не найден в PATH."
)
"Локальный Node.js не найден."
) from error
if not TILESERVER_ENTRY.is_file():
raise LifecycleError(
@@ -165,7 +166,8 @@ def start_tileserver():
process = subprocess.Popen(
command,
cwd=TILESERVER_DIR,
stdin=subprocess.DEVNULL
stdin=subprocess.DEVNULL,
env=get_runtime_env()
)
deadline = time.monotonic() + STARTUP_TIMEOUT
@@ -873,8 +875,12 @@ def install():
if shutil.which("sudo") is None:
raise LifecycleError("Не найден sudo.")
if shutil.which("node") is None:
raise LifecycleError("Не найден Node.js.")
try:
get_node_path()
except FileNotFoundError as error:
raise LifecycleError(
"Локальный Node.js не найден."
) from error
if not TILESERVER_ENTRY.is_file():
raise LifecycleError(