aboutsummaryrefslogtreecommitdiff
path: root/misc
diff options
context:
space:
mode:
authorJohan Brandhorst-Satzkorn <johan.brandhorst@gmail.com>2023-05-26 09:58:43 -0700
committerJohan Brandhorst-Satzkorn <johan.brandhorst@gmail.com>2023-05-26 17:21:14 +0000
commit188066cfbc2589e82de9325f9d7a21a9a1043bbd (patch)
treeb4b591906761083314d2cb89a67ed52cc768b19f /misc
parentc2633dfe7749fbb6ff82cccd3bc719b973d8d8ec (diff)
downloadgo-188066cfbc2589e82de9325f9d7a21a9a1043bbd.tar.gz
go-188066cfbc2589e82de9325f9d7a21a9a1043bbd.zip
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 <gobot@golang.org> Reviewed-by: Dmitri Shuralyov <dmitshur@google.com> Reviewed-by: Bryan Mills <bcmills@google.com> Run-TryBot: Johan Brandhorst-Satzkorn <johan.brandhorst@gmail.com>
Diffstat (limited to 'misc')
-rwxr-xr-xmisc/wasm/go_wasip1_wasm_exec6
1 files changed, 3 insertions, 3 deletions
diff --git a/misc/wasm/go_wasip1_wasm_exec b/misc/wasm/go_wasip1_wasm_exec
index dcec1c6392..97bacfbff1 100755
--- a/misc/wasm/go_wasip1_wasm_exec
+++ b/misc/wasm/go_wasip1_wasm_exec
@@ -5,13 +5,13 @@
case "$GOWASIRUNTIME" in
"wasmedge")
- exec wasmedge --dir=/ --env PWD="$PWD" ${GOWASIRUNTIMEARGS:-} "$1" "${@:2}"
+ exec wasmedge --dir=/ --env PWD="$PWD" --env PATH="$PATH" ${GOWASIRUNTIMEARGS:-} "$1" "${@:2}"
;;
"wasmer")
- exec wasmer run --dir=/ --env PWD="$PWD" ${GOWASIRUNTIMEARGS:-} "$1" -- "${@:2}"
+ exec wasmer run --dir=/ --env PWD="$PWD" --env PATH="$PATH" ${GOWASIRUNTIMEARGS:-} "$1" -- "${@:2}"
;;
"wasmtime")
- exec wasmtime run --dir=/ --env PWD="$PWD" --max-wasm-stack 1048576 ${GOWASIRUNTIMEARGS:-} "$1" -- "${@:2}"
+ exec wasmtime run --dir=/ --env PWD="$PWD" --env PATH="$PATH" --max-wasm-stack 1048576 ${GOWASIRUNTIMEARGS:-} "$1" -- "${@:2}"
;;
"wazero" | "")
exec wazero run -mount /:/ -env-inherit -cachedir "${TMPDIR:-/tmp}"/wazero ${GOWASIRUNTIMEARGS:-} "$1" "${@:2}"