view third_party/emsdk/test/test_node_path.sh @ 279:b3b547563ec7

Add Google connector service and agent wiki Implement the C/Seobeo Google Drive and Gmail connector with encrypted OAuth storage, Zenbu authentication, browser testing, AI tool discovery, chunked HTTP decoding, and Bazel coverage. Consolidate repository guidance into progressive wiki documentation and enforce arena-first allocation for new first-party C code. Co-authored-by: Copilot <[email protected]> Copilot-Session: 84c338fd-0939-4bb3-b7f3-1062eb213e5d
author MrJuneJune <me@mrjunejune.com>
date Mon, 17 Aug 2026 22:22:36 -0700
parents 8d17f6e6e290
children
line wrap: on
line source

#!/usr/bin/env bash

echo "Test that node is added to that PATH if, and only if, it is not one already present".

if [ -n "$EMSDK" ]; then
    echo "EMSDK is already defined in this shell. Run tests in a shell without sourcing emsdk_env.sh first"
    exit 1
fi

DIR=$(dirname "$BASH_SOURCE")
cd $DIR/..

./emsdk install latest
./emsdk activate latest

if which node; then
  echo "Test should be run without node in the path"
  exit 1
fi

# Run emsdk_env.sh and confirm that node was added to the PATH
. emsdk_env.sh

if ! which node; then
  echo "node not found in path after emsdk_env.sh"
  exit 1
fi

# Run emsdk_env.sh again and confirm that node is still in the PATH
. emsdk_env.sh

if ! which node; then
  echo "node not found in path after emsdk_env.sh"
  exit 1
fi