feat: proper windows support
This commit is contained in:
@@ -1,8 +1,20 @@
|
||||
#!/usr/bin/env bash
|
||||
set -euo pipefail
|
||||
|
||||
binary="$1"
|
||||
launcher="$1"
|
||||
|
||||
grep -Fq -- '--no-install' "${binary}"
|
||||
grep -Fq -- '--preload' "${binary}"
|
||||
grep -Fq -- '--env-file' "${binary}"
|
||||
python3 - "${launcher}" <<'PY'
|
||||
import json
|
||||
import pathlib
|
||||
import sys
|
||||
|
||||
path = pathlib.Path(sys.argv[1])
|
||||
if path.suffix.lower() == ".cmd":
|
||||
path = pathlib.Path(str(path)[:-4])
|
||||
spec = json.loads(pathlib.Path(f"{path}.launcher.json").read_text())
|
||||
|
||||
assert "--no-install" in spec["argv"], spec
|
||||
assert spec["inherit_host_path"] is False, spec
|
||||
assert spec["preload_short_paths"] and spec["preload_short_paths"][0].endswith("tests/binary_test/preload.ts"), spec
|
||||
assert spec["env_file_short_paths"] and spec["env_file_short_paths"][0].endswith("tests/binary_test/runtime.env"), spec
|
||||
PY
|
||||
|
||||
Reference in New Issue
Block a user