fix: remove --workspace flag (invalid for global npm), keep env var

This commit is contained in:
iamninja committed 2026-10-05 15:16:16 +05:00
1 parent caba7a5f72
commit c5afd450f5
1 file changed
+6 -3
+6 -3
View File
@@ -2234,8 +2234,9 @@ def _build_frontend(src_frontend: Path, dest_frontend: Path):
try:
env = os.environ.copy()
env["NPM_CONFIG_WORKSPACES"] = ""
env["NPM_CONFIG_WORKSPACE"] = ""
subprocess.run(
["npm", "install", "-g", "@yarnpkg/cli", "--workspace="],
["npm", "install", "-g", "@yarnpkg/cli"],
check=False, cwd="/tmp", env=env,
)
@@ -2256,8 +2257,9 @@ def _build_frontend(src_frontend: Path, dest_frontend: Path):
try:
env = os.environ.copy()
env["NPM_CONFIG_WORKSPACES"] = ""
env["NPM_CONFIG_WORKSPACE"] = ""
subprocess.run(
["npm", "install", "-g", "yarn@1", "--workspace="],
["npm", "install", "-g", "yarn@1"],
check=False, cwd="/tmp", env=env,
)
except Exception:
@@ -2268,8 +2270,9 @@ def _build_frontend(src_frontend: Path, dest_frontend: Path):
# Uninstall any global yarn 4.x first
env = os.environ.copy()
env["NPM_CONFIG_WORKSPACES"] = ""
env["NPM_CONFIG_WORKSPACE"] = ""
subprocess.run(
["npm", "uninstall", "-g", "@yarnpkg/cli", "--workspace="],
["npm", "uninstall", "-g", "@yarnpkg/cli"],
check=False, cwd="/tmp", env=env,
)