From 99ab700c1bdef59c5af4d8ca6efe035701d3c1c3 Mon Sep 17 00:00:00 2001 From: Anders Kaseorg Date: Thu, 30 Mar 2023 15:31:05 -0700 Subject: [PATCH] Revert "node_cache: Work around pnpm install issue in Docker for Mac." This reverts commit 126f3b5f47240a65c3fe414cd5d70a8e0ed8dbe8. Testing showed that it was ineffective for many users. Signed-off-by: Anders Kaseorg --- scripts/lib/node_cache.py | 23 +++++++++-------------- 1 file changed, 9 insertions(+), 14 deletions(-) diff --git a/scripts/lib/node_cache.py b/scripts/lib/node_cache.py index a68c760c7d..9cf2406ff5 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 get_deploy_root, run +from scripts.lib.zulip_tools import run DEFAULT_PRODUCTION = False @@ -16,16 +16,11 @@ def setup_node_modules(production: bool = DEFAULT_PRODUCTION) -> None: except FileNotFoundError: pass - 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) + run( + [ + "/usr/local/bin/pnpm", + "install", + "--frozen-lockfile", + *(["--prod"] if production else []), + ] + )