Understand any codebase instantly. System intelligence for codebases, built for humans and AI.
TypeScript aiai-memoryclaude-codeclicode-analysiscode-mappingcode-memorycodebase-understandingcodexdeveloper-toolsllmopenclawpersistent-memoryprogram-analysissoftware-architecturesystem-intelligencesystem-mapping
fix(install): prevent stdin consumption when run via curl | sh (#101)
Riley Thompson1f15398611aa
diff --git a/scripts/install/install.sh b/scripts/install/install.shindex 2a82e27a..412c548c 100755--- a/scripts/install/install.sh+++ b/scripts/install/install.sh@@ -145,21 +145,21 @@ install_or_upgrade_node() {if command -v brew >/dev/null 2>&1; thenecho " ${action} Node.js via Homebrew..."if [ "$action" = "Upgrading" ]; then- brew upgrade node 2>/dev/null || brew install node+ brew upgrade node < /dev/null 2>/dev/null || brew install node < /dev/nullelse- brew install node 2>/dev/null || true+ brew install node < /dev/null 2>/dev/null || truefi# Handle "installed but not linked" — common when a previous version left stale symlinksif ! command -v node >/dev/null 2>&1; thenecho " Linking Node.js..."- if ! brew link --overwrite node 2>/dev/null; then+ if ! brew link --overwrite node < /dev/null 2>/dev/null; then# Fix ownership on dirs Homebrew needs to symlink intofor dir in /usr/local/include/node /usr/local/lib/node_modules /usr/local/share/doc/node; doif [ -d "$dir" ] && [ ! -w "$dir" ]; then- sudo chown -R "$(whoami)" "$dir" 2>/dev/null || true+ sudo chown -R "$(whoami)" "$dir" < /dev/null 2>/dev/null || truefidone- brew link --overwrite node 2>/dev/null || true+ brew link --overwrite node < /dev/null 2>/dev/null || truefifielse@@ -177,26 +177,26 @@ install_or_upgrade_node() {elsecurl -fsSL "https://nodejs.org/dist/v${node_ver}/node-v${node_ver}-darwin-x64.pkg" -o "$node_pkg"fi- sudo installer -pkg "$node_pkg" -target /+ sudo installer -pkg "$node_pkg" -target / < /dev/nullrm -f "$node_pkg"fi;;Linux)if command -v apt-get >/dev/null 2>&1; thenecho " ${action} Node.js via NodeSource (apt)..."- curl -fsSL https://deb.nodesource.com/setup_22.x | sudo -E bash -- sudo apt-get install -y nodejs+ curl -fsSL https://deb.nodesource.com/setup_22.x | sudo -E bash - < /dev/null+ sudo apt-get install -y nodejs < /dev/nullelif command -v dnf >/dev/null 2>&1; thenecho " ${action} Node.js via NodeSource (dnf)..."- curl -fsSL https://rpm.nodesource.com/setup_22.x | sudo bash -- sudo dnf install -y nodejs+ curl -fsSL https://rpm.nodesource.com/setup_22.x | sudo bash - < /dev/null+ sudo dnf install -y nodejs < /dev/nullelif command -v yum >/dev/null 2>&1; thenecho " ${action} Node.js via NodeSource (yum)..."- curl -fsSL https://rpm.nodesource.com/setup_22.x | sudo bash -- sudo yum install -y nodejs+ curl -fsSL https://rpm.nodesource.com/setup_22.x | sudo bash - < /dev/null+ sudo yum install -y nodejs < /dev/nullelif command -v apk >/dev/null 2>&1; thenecho " ${action} Node.js via apk..."- sudo apk add --update nodejs npm+ sudo apk add --update nodejs npm < /dev/nullelseerr "Could not detect a supported package manager (apt, dnf, yum, apk). Install Node.js ${NODE_MIN_MAJOR}+ manually: https://nodejs.org/"fi@@ -287,7 +287,7 @@ elseerr "Install Docker and re-run this installer."fi- if ! docker info >/dev/null 2>&1; then+ if ! docker info < /dev/null >/dev/null 2>&1; thenecho ""echo " Docker is installed but not running."case "$(uname -s)" in@@ -297,7 +297,7 @@ elseopen -a Dockerecho " Waiting for Docker to start (this can take 30-60 seconds)..."for i in $(seq 1 30); do- if docker info >/dev/null 2>&1; then break; fi+ if docker info < /dev/null >/dev/null 2>&1; then break; fiprintf "."sleep 2done@@ -306,7 +306,7 @@ else;;esac- if ! docker info >/dev/null 2>&1; then+ if ! docker info < /dev/null >/dev/null 2>&1; thenerr "Docker is not running. Start Docker and re-run this installer."fifi@@ -341,7 +341,7 @@ elseinfo "Downloaded docker-compose.yml"printf " Starting backend services (this may take a minute on first run)..."- docker compose -f "$COMPOSE_DIR/docker-compose.yml" up -d --pull always >/dev/null 2>&1 &+ docker compose -f "$COMPOSE_DIR/docker-compose.yml" up -d --pull always < /dev/null >/dev/null 2>&1 &DOCKER_PID=$!while kill -0 "$DOCKER_PID" 2>/dev/null; doprintf "."