fix: fix corepack install command (remove bad input/stdin)

This commit is contained in:
iamninja committed 2026-10-05 14:35:58 +05:00
1 parent fe754e15b9
commit 7e08280539
1 file changed
+16 -20
+16 -20
View File
@@ -2172,37 +2172,33 @@ def _build_frontend(src_frontend: Path, dest_frontend: Path):
if shutil.which("corepack"):
try:
# Enable corepack
result = subprocess.run(
subprocess.run(
["corepack", "enable"],
input="",
stdin=subprocess.PIPE,
capture_output=True,
timeout=10,
check=False,
)
# Install Yarn stable (4.x)
result = subprocess.run(
["corepack", "install", "-g", "yarn@stable"],
capture_output=True,
timeout=60,
text=True,
check=False,
)
if result.returncode == 0 or "already" in (result.stderr or "").lower():
# Install Yarn stable (4.x)
result = subprocess.run(
["corepack", "install", "-g", "yarn@stable"],
if result.returncode == 0:
# Activate it
subprocess.run(
["corepack", "prepare", "yarn@stable", "--activate"],
capture_output=True,
timeout=60,
text=True,
timeout=30,
check=False,
)
if result.returncode == 0:
# Activate it
subprocess.run(
["corepack", "prepare", "yarn@stable", "--activate"],
capture_output=True,
timeout=30,
check=False,
)
# Check version
if shutil.which("yarn"):
# Check version
if shutil.which("yarn"):
major = _get_yarn_major_version(["yarn"])
if major and major >= 4: