]> Cypherpunks.ru repositories - gostls13.git/commitdiff
misc/wasm: default to /tmp if TMPDIR is unset
authorBryan C. Mills <bcmills@google.com>
Wed, 26 Apr 2023 19:54:28 +0000 (15:54 -0400)
committerGopher Robot <gobot@golang.org>
Wed, 26 Apr 2023 21:21:32 +0000 (21:21 +0000)
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>

misc/wasm/go_wasip1_wasm_exec

index 9838212d98ea20c8c14877df095d86d039e3c600..3e1fc62156a2663fec717acb8d76bae1360dcf97 100755 (executable)
@@ -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"