feat: proper windows support
This commit is contained in:
@@ -1,16 +1,23 @@
|
||||
#!/usr/bin/env bash
|
||||
set -euo pipefail
|
||||
|
||||
binary="$1"
|
||||
launcher="$1"
|
||||
|
||||
grep -Fq -- 'install_metadata="${runfiles_dir}/_main/' "${binary}"
|
||||
grep -Fq -- 'node_modules/.rules_bun/install.json' "${binary}"
|
||||
grep -Fq -- "--smol" "${binary}"
|
||||
grep -Fq -- "--conditions" "${binary}"
|
||||
grep -Fq -- "'browser'" "${binary}"
|
||||
grep -Fq -- "'development'" "${binary}"
|
||||
grep -Fq -- "--install" "${binary}"
|
||||
grep -Fq -- "'force'" "${binary}"
|
||||
grep -Fq -- "'--hot'" "${binary}"
|
||||
grep -Fq -- "'--console-depth'" "${binary}"
|
||||
grep -Fq -- "'4'" "${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())
|
||||
argv = spec["argv"]
|
||||
|
||||
assert spec["install_metadata_short_path"].endswith("node_modules/.rules_bun/install.json"), spec
|
||||
assert spec["inherit_host_path"] is True, spec
|
||||
assert spec["node_modules_roots"], spec
|
||||
assert all(not root.startswith("../") for root in spec["node_modules_roots"]), spec
|
||||
for value in ["--smol", "--conditions", "browser", "development", "--install", "force", "--hot", "--console-depth", "4"]:
|
||||
assert value in argv, (value, spec)
|
||||
PY
|
||||
|
||||
Reference in New Issue
Block a user