Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions scripts/lind_run
Original file line number Diff line number Diff line change
Expand Up @@ -38,4 +38,10 @@ if [[ ! -x "${WASMTIME_BIN}" ]]; then
fi
[[ -x "${WASMTIME_BIN}" ]] || { echo "error: wasmtime not found at ${WASMTIME_BIN}" >&2; exit 2; }

# Check if we need to re-exec with sudo
if [[ $EUID -ne 0 ]]; then
# Not running as root, re-exec with sudo
exec sudo -E "$0" "$@"
fi

exec "${WASMTIME_BIN}" run --allow-precompiled --wasi threads=y --wasi preview2=n "$@"