fix: add debug for yarn binary path and version in _pick_yarn_cmd

This commit is contained in:
iamninja committed 2026-10-05 15:44:30 +05:00
1 parent 7b1b8b1b5f
commit 590bda7491
1 file changed
+5 -1
+5 -1
View File
@@ -1989,7 +1989,11 @@ def _build_frontend(src_frontend: Path, dest_frontend: Path):
"""Find working yarn command (requires Yarn 4.x or higher).""" """Find working yarn command (requires Yarn 4.x or higher)."""
# Check yarn in PATH # Check yarn in PATH
if shutil.which("yarn"): yarn_bin = shutil.which("yarn")
if yarn_bin:
result = subprocess.run([yarn_bin, "--version"], capture_output=True, text=True, timeout=5)
if DEBUG:
print(f" debug pick: yarn_bin={yarn_bin}, version={result.stdout.strip()}, major={_get_yarn_major_version(['yarn'])}")
major = _get_yarn_major_version(["yarn"]) major = _get_yarn_major_version(["yarn"])
if major and major >= 4: if major and major >= 4:
return ["yarn"] return ["yarn"]