Specify working directory for the serve-locally target

Meson doc says that run_targets are run in an unspecified directory.
This commit is contained in:
Tamás Bálint Misius
2025-05-12 19:49:14 +02:00
parent 0096d27d25
commit bf7f40108e
2 changed files with 8 additions and 0 deletions

View File

@@ -632,6 +632,7 @@ if host_platform == 'emscripten'
command: [
python3_prog,
serve_wasm_py,
'@BUILD_ROOT@',
],
depends: powder_exe,
)

View File

@@ -7,6 +7,13 @@ import ssl
import sys
import time
(
script,
build_root,
) = sys.argv
os.chdir(build_root)
HTTP_HOST = '127.0.0.1'
HTTP_PORT = 8000
HTTP_INDEX = 'serve-wasm.index.html'