From 17ed4212eb94c4df34e778e8e879d38707c5b21a Mon Sep 17 00:00:00 2001 From: geobelsky Date: Tue, 24 Mar 2026 12:50:49 +0000 Subject: [PATCH 1/2] fix: ensure_path checks rc file, not runtime PATH When the user manually exports PATH before running install.sh via pipe, the subprocess inherits that PATH. The old runtime check (case ":$PATH:") would return early without modifying .zshrc, leaving future terminal sessions without axme in PATH. Now we only check the rc file for duplicates, which is the correct persistent indicator. --- install.sh | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/install.sh b/install.sh index 6a3b081..114674b 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 From 6d477f7d2cb15124ae3aeb173f51ffafa7b9322e Mon Sep 17 00:00:00 2001 From: geobelsky Date: Tue, 24 Mar 2026 12:57:13 +0000 Subject: [PATCH 2/2] fix: add source hint after install and in README - ensure_path now prints "source ~/.zshrc" hint after modifying rc file - README install block includes source command --- README.md | 1 + install.sh | 2 ++ 2 files changed, 3 insertions(+) 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 114674b..4f342af 100755 --- a/install.sh +++ b/install.sh @@ -171,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