From d4fd8d8da466ea3ed5a87cbc7beeac1c2710e228 Mon Sep 17 00:00:00 2001 From: Agentik OS Date: Wed, 3 Jun 2026 10:18:27 +0200 Subject: [PATCH] fix(install): honor CARGO_HOME/RUSTUP_HOME + document env-overridable paths install.sh hardcoded `source "$HOME/.cargo/env"`, ignoring a host-set CARGO_HOME and forcing the Rust toolchain into ~/.cargo. Make it honor the standard CARGO_HOME (RUSTUP_HOME is already honored by rustup), and document that OMEGA_DIR / INSTALL_DIR / OMEGA_SRC / CARGO_HOME / RUSTUP_HOME are all env-overridable so a host can route install paths (XDG / clean-home setups, shared multi-user installs) without forking the script. Behavior is identical when the vars are unset (defaults unchanged), so install parity (L0) is preserved. Co-Authored-By: Claude Opus 4.8 (1M context) --- install.sh | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/install.sh b/install.sh index 0521fbdd..a6ca490d 100755 --- a/install.sh +++ b/install.sh @@ -8,6 +8,10 @@ set -euo pipefail OMEGA_VERSION="0.1.0" +# Install paths are env-overridable so a host can route them (XDG / clean-home setups, +# shared multi-user installs, etc.) without forking this script. Defaults match the +# standard single-user layout. Honored vars: OMEGA_DIR, INSTALL_DIR, OMEGA_SRC, +# plus the standard CARGO_HOME / RUSTUP_HOME for the Rust toolchain. OMEGA_DIR="${OMEGA_DIR:-$HOME/.omega}" INSTALL_DIR="${INSTALL_DIR:-$HOME/.local/bin}" REPO_URL="https://github.com/agentik-os/OmegaOS" @@ -152,7 +156,7 @@ if ! command -v cargo &>/dev/null; then info "Rust not found. Installing via rustup..." command -v curl >/dev/null 2>&1 || { err "curl is required to bootstrap Rust but is missing; install curl and re-run."; exit 1; } curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y - source "$HOME/.cargo/env" + source "${CARGO_HOME:-$HOME/.cargo}/env" ok "Rust installed: $(rustc --version)" else ok "Rust found: $(rustc --version)"