Skip to content

Commit bf7f401

Browse files
committed
Specify working directory for the serve-locally target
Meson doc says that run_targets are run in an unspecified directory.
1 parent 0096d27 commit bf7f401

2 files changed

Lines changed: 8 additions & 0 deletions

File tree

meson.build

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -632,6 +632,7 @@ if host_platform == 'emscripten'
632632
command: [
633633
python3_prog,
634634
serve_wasm_py,
635+
'@BUILD_ROOT@',
635636
],
636637
depends: powder_exe,
637638
)

resources/serve-wasm.template.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,13 @@
77
import sys
88
import time
99

10+
(
11+
script,
12+
build_root,
13+
) = sys.argv
14+
15+
os.chdir(build_root)
16+
1017
HTTP_HOST = '127.0.0.1'
1118
HTTP_PORT = 8000
1219
HTTP_INDEX = 'serve-wasm.index.html'

0 commit comments

Comments
 (0)