Skip to content

Commit 7d81a7a

Browse files
authored
Merge pull request #217 from saulecabrera/fix-wasmtime-adapter
Fix undefined variable in wasmtime adapter
2 parents d6290cb + d6b1693 commit 7d81a7a

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

adapters/wasmtime.py

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,8 @@
1-
import subprocess
21
import os
32
import shlex
4-
import sys
3+
import subprocess
54
from pathlib import Path
65
from typing import Dict, List, Tuple
7-
import importlib
8-
96

107
# shlex.split() splits according to shell quoting rules
118
WASMTIME = shlex.split(os.getenv("WASMTIME", "wasmtime"))
@@ -55,7 +52,7 @@ def compute_argv(test_path: str,
5552
# options, so that the user can override our choices.
5653
def _add_wasi_version_options(argv: List[str], wasi_version: str, proposals: List[str]) -> None:
5754
splice_pos = len(WASMTIME)
58-
while splice_pos > 1 and args[splice_pos-1].startswith("-"):
55+
while splice_pos > 1 and argv[splice_pos - 1].startswith("-"):
5956
splice_pos -= 1
6057
match wasi_version:
6158
case "wasm32-wasip1":

0 commit comments

Comments
 (0)