Skip to content

fix: ensure_path checks rc file, not runtime PATH#72

Merged
George-iam merged 2 commits intomainfrom
feat/install-path-fix-20260324
Mar 24, 2026
Merged

fix: ensure_path checks rc file, not runtime PATH#72
George-iam merged 2 commits intomainfrom
feat/install-path-fix-20260324

Conversation

@George-iam
Copy link
Contributor

Summary

  • Removed runtime PATH check (case ":$PATH:") from ensure_path() in install.sh
  • Now only checks the rc file (.zshrc/.bashrc/etc.) for duplicates before adding PATH entry
  • Fixes bug where curl ... | sh inherits a temporary export PATH from the parent shell, causing ensure_path to skip rc file modification — leaving future terminal sessions without axme in PATH

Test plan

  • On macOS (zsh): export PATH="$HOME/.local/bin:$PATH" then curl -fsSL .../install.sh | sh — should still add to .zshrc
  • Fresh install (no prior PATH export) — should add to .zshrc and print "Adding to PATH"
  • Re-run install — should skip (rc file already has the line)

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.
- ensure_path now prints "source ~/.zshrc" hint after modifying rc file
- README install block includes source command
@George-iam George-iam merged commit f132449 into main Mar 24, 2026
1 check passed
@George-iam George-iam deleted the feat/install-path-fix-20260324 branch March 24, 2026 13:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant