Skip to content

Commit

Permalink
Fix client autobuild for Ubuntu
Browse files Browse the repository at this point in the history
  • Loading branch information
brentyi committed Aug 2, 2023
1 parent 7cd09b7 commit 8518a1d
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion viser/_client_autobuild.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit 8518a1d

Please sign in to comment.