diff --git a/README.md b/README.md index 8aa2a88..6bd4058 100644 --- a/README.md +++ b/README.md @@ -62,6 +62,7 @@ Install or update to the latest release (Linux/macOS, no Go required): ```bash curl -fsSL https://raw.githubusercontent.com/AxmeAI/axme-cli/main/install.sh | sh +source ~/.zshrc # or open a new terminal ``` The same command installs if you don't have the CLI, and upgrades to the latest release if you do. After install the CLI periodically checks for new versions in the background and prompts you to update. diff --git a/install.sh b/install.sh index 6a3b081..4f342af 100755 --- a/install.sh +++ b/install.sh @@ -133,11 +133,6 @@ fi log "Installed ${BIN_NAME} ${VERSION} to ${INSTALL_DIR}/${BIN_NAME}" ensure_path() { - # Already in PATH — nothing to do - case ":$PATH:" in - *":${INSTALL_DIR}:"*) return 0 ;; - esac - SHELL_NAME="$(basename "${SHELL:-/bin/sh}")" LINE="export PATH=\"${INSTALL_DIR}:\$PATH\"" @@ -158,7 +153,7 @@ ensure_path() { *) RC_FILE="$HOME/.profile" ;; esac - # Don't duplicate if the line is already in the rc file + # Skip if rc file already has the path (don't check runtime PATH — may be temporary) if [ -f "$RC_FILE" ] && grep -qF "$INSTALL_DIR" "$RC_FILE" 2>/dev/null; then return 0 fi @@ -176,6 +171,8 @@ ensure_path() { export PATH="${INSTALL_DIR}:$PATH" log "Done. PATH updated for current and future sessions." + log "" + log "To use axme in this terminal, run: source ${RC_FILE}" } ensure_path