Skip to content

Commit 188066c

Browse files
misc/wasm: set PATH variable in exec
The PATH variable is required to run the testenv tests. Set it for all the runtime invocations where we don't already set it by inheriting from the environment. For #59583 For #59907 For #60097 Change-Id: If582dd8f086e3f40bc58d555f6034dcffe6f8e5f Reviewed-on: https://go-review.googlesource.com/c/go/+/498616 TryBot-Result: Gopher Robot <[email protected]> Reviewed-by: Dmitri Shuralyov <[email protected]> Reviewed-by: Bryan Mills <[email protected]> Run-TryBot: Johan Brandhorst-Satzkorn <[email protected]>
1 parent c2633df commit 188066c

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

misc/wasm/go_wasip1_wasm_exec

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,13 @@
55

66
case "$GOWASIRUNTIME" in
77
"wasmedge")
8-
exec wasmedge --dir=/ --env PWD="$PWD" ${GOWASIRUNTIMEARGS:-} "$1" "${@:2}"
8+
exec wasmedge --dir=/ --env PWD="$PWD" --env PATH="$PATH" ${GOWASIRUNTIMEARGS:-} "$1" "${@:2}"
99
;;
1010
"wasmer")
11-
exec wasmer run --dir=/ --env PWD="$PWD" ${GOWASIRUNTIMEARGS:-} "$1" -- "${@:2}"
11+
exec wasmer run --dir=/ --env PWD="$PWD" --env PATH="$PATH" ${GOWASIRUNTIMEARGS:-} "$1" -- "${@:2}"
1212
;;
1313
"wasmtime")
14-
exec wasmtime run --dir=/ --env PWD="$PWD" --max-wasm-stack 1048576 ${GOWASIRUNTIMEARGS:-} "$1" -- "${@:2}"
14+
exec wasmtime run --dir=/ --env PWD="$PWD" --env PATH="$PATH" --max-wasm-stack 1048576 ${GOWASIRUNTIMEARGS:-} "$1" -- "${@:2}"
1515
;;
1616
"wazero" | "")
1717
exec wazero run -mount /:/ -env-inherit -cachedir "${TMPDIR:-/tmp}"/wazero ${GOWASIRUNTIMEARGS:-} "$1" "${@:2}"

0 commit comments

Comments
 (0)