From 8518a1db7d9ac97c7683b0262a320c1774603477 Mon Sep 17 00:00:00 2001 From: Brent Yi Date: Wed, 2 Aug 2023 10:47:46 -0700 Subject: [PATCH] Fix client autobuild for Ubuntu --- viser/_client_autobuild.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/viser/_client_autobuild.py b/viser/_client_autobuild.py index 19ae9a89e..7e0f82d55 100644 --- a/viser/_client_autobuild.py +++ b/viser/_client_autobuild.py @@ -27,15 +27,17 @@ def ensure_client_is_built() -> None: print("[viser] Client build looks out of date. Building now...") build = True - # Install nodejs and build if necessary. + # Install nodejs and build if necessary. We assume bash is installed. if build: env_dir = _install_sandboxed_node() npx_path = env_dir / "bin" / "npx" subprocess.run( args=( + "bash -c '" f"source {env_dir / 'bin' / 'activate'};" f"{npx_path} yarn install;" "yarn run build;" + "'" ), cwd=client_dir, shell=True,