diff options
author | Bryan C. Mills <bcmills@google.com> | 2023-04-26 15:54:28 -0400 |
---|---|---|
committer | Gopher Robot <gobot@golang.org> | 2023-04-26 21:21:32 +0000 |
commit | 527745c4d55d07279125e1ad5442a86d2a631250 (patch) | |
tree | 49362a683313c336a7897e9cdc8a2ca12c6f9d60 /misc | |
parent | ffa663c9b3c942cbde590bb792179dcca52224b7 (diff) | |
download | go-git-527745c4d55d07279125e1ad5442a86d2a631250.tar.gz |
misc/wasm: default to /tmp if TMPDIR is unset
Change-Id: Ibf460d86ced08687099725bcd8ea8f38d7e8484c
Reviewed-on: https://go-review.googlesource.com/c/go/+/489435
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
Auto-Submit: Bryan Mills <bcmills@google.com>
Reviewed-by: Johan Brandhorst-Satzkorn <johan.brandhorst@gmail.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Run-TryBot: Bryan Mills <bcmills@google.com>
Diffstat (limited to 'misc')
-rwxr-xr-x | misc/wasm/go_wasip1_wasm_exec | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/misc/wasm/go_wasip1_wasm_exec b/misc/wasm/go_wasip1_wasm_exec index 9838212d98..3e1fc62156 100755 --- a/misc/wasm/go_wasip1_wasm_exec +++ b/misc/wasm/go_wasip1_wasm_exec @@ -8,7 +8,7 @@ case "$GOWASIRUNTIME" in exec wasmtime run --dir=/ --env PWD="$PWD" --max-wasm-stack 1048576 "$1" -- "${@:2}" ;; "wazero" | "") - exec wazero run -mount /:/ -env-inherit -cachedir "${TMPDIR}"/wazero "$1" "${@:2}" + exec wazero run -mount /:/ -env-inherit -cachedir "${TMPDIR:-/tmp}"/wazero "$1" "${@:2}" ;; *) echo "Unknown Go WASI runtime specified: $GOWASIRUNTIME" |