Zulip server and web application. Open-source team chat that helps teams stay productive and focused.
node_cache: Work around pnpm install issue in Docker for Mac.
Anders Kaseorg126f3b5f4724
diff --git a/scripts/lib/node_cache.py b/scripts/lib/node_cache.pyindex 9cf2406ff59..a68c760c7df 100644--- a/scripts/lib/node_cache.py+++ b/scripts/lib/node_cache.py@@ -1,6 +1,6 @@import os-from scripts.lib.zulip_tools import run+from scripts.lib.zulip_tools import get_deploy_root, runDEFAULT_PRODUCTION = False@@ -16,11 +16,16 @@ def setup_node_modules(production: bool = DEFAULT_PRODUCTION) -> None:except FileNotFoundError:pass- run(- [- "/usr/local/bin/pnpm",- "install",- "--frozen-lockfile",- *(["--prod"] if production else []),- ]- )+ pnpm_command = ["/usr/local/bin/pnpm", "install", "--frozen-lockfile"]+ if production:+ pnpm_command += ["--prod"]++ deploy_root = get_deploy_root()+ with open("/proc/self/mounts") as mounts:+ for line in mounts:+ fields = line.split()+ if fields[1] == deploy_root and fields[2] in ("fuse.grpcfuse", "fakeowner"):+ print("Working around https://github.com/pnpm/pnpm/issues/5803")+ pnpm_command += ["--package-import-method=copy"]++ run(pnpm_command)