Skip to content

Commit 0afc7e5

Browse files
committed
[autorelease] Only mount accessible directories in /.
Otherwise running any tools fails with an obscure wasmtime message about preopens on wasmtime>=21. This is similar to the change in commit c26c8d4.
1 parent cdf5e9d commit 0afc7e5

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

yowasp_runtime/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ def run_wasm(__package__, wasm_filename, *, resources=[], argv):
6868
else:
6969
# can't do this for files, but no one's going to use yowasp on files in / anyway
7070
for path in os.listdir("/"):
71-
if os.path.isdir("/" + path):
71+
if os.path.isdir("/" + path) and os.access("/" + path, os.R_OK):
7272
wasi_cfg.preopen_dir("/" + path, "/" + path)
7373

7474
# preopens for relative paths

0 commit comments

Comments
 (0)