From 410d0a38b77c5ebaed9b9e25304adf0a6447efb3 Mon Sep 17 00:00:00 2001 From: Frank Denis Date: Tue, 7 Feb 2023 18:28:10 +0100 Subject: [PATCH] Check for iwasm existence before trying to use it --- test/default/wasi-test-wrapper.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/test/default/wasi-test-wrapper.sh b/test/default/wasi-test-wrapper.sh index d0f59299..9835c75f 100755 --- a/test/default/wasi-test-wrapper.sh +++ b/test/default/wasi-test-wrapper.sh @@ -76,6 +76,7 @@ if [ -z "$WASI_RUNTIME" ] || [ "$WASI_RUNTIME" = "wasm3" ]; then fi if [ -z "$WASI_RUNTIME" ] || [ "$WASI_RUNTIME" = "iwasm" ]; then + if command -v iwasm >/dev/null; then if iwasm | grep -qi wasi >/dev/null 2>&1; then if wamrc --version; then wamrc -o "${1}.o" "$1" >/dev/null && @@ -84,6 +85,7 @@ if [ -z "$WASI_RUNTIME" ] || [ "$WASI_RUNTIME" = "iwasm" ]; then iwasm --dir=. "$1" && exit 0 fi fi + fi fi if [ -z "$WASI_RUNTIME" ] || [ "$WASI_RUNTIME" = "wazero" ]; then