fix: add debug for yarn binary path and version in _pick_yarn_cmd
This commit is contained in:
1 parent
7b1b8b1b5f
commit
590bda7491
1 file changed
+5
-1
+5
-1
@@ -1989,7 +1989,11 @@ def _build_frontend(src_frontend: Path, dest_frontend: Path):
|
||||
"""Find working yarn command (requires Yarn 4.x or higher)."""
|
||||
|
||||
# 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"])
|
||||
if major and major >= 4:
|
||||
return ["yarn"]
|
||||
|
||||
Reference in new issue
Block a user