fix(cli): resolve git-bash for the lab entry point on windows

This commit is contained in:
ZSecurity
2026-10-24 14:07:06 +07:00
parent ccace1e510
commit 8366583c43
+4 -2
View File
@@ -2,6 +2,7 @@ import argparse
import hashlib
import json
import os
import shutil
import subprocess
import sys
import time
@@ -246,8 +247,9 @@ def cmd_exploit(args):
def cmd_lab(args):
up = os.path.join(ROOT, "lab", "up.sh")
r = subprocess.run(["bash", up])
up = os.path.join(ROOT, "lab", "up.sh").replace("\\", "/")
shell = shutil.which("bash") or "/bin/bash"
r = subprocess.run([shell, up])
if r.returncode != 0:
print("lab up failed", file=sys.stderr)
return 1