Merge pull request #178 from gamedevCloudy/main

fix(install): ignore commented lines when checking for PATH
This commit is contained in:
Teknium 2026-02-28 02:14:31 -08:00 committed by GitHub
commit 0afe1b707d
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -723,7 +723,7 @@ setup_path() {
PATH_LINE='export PATH="$HOME/.local/bin:$PATH"'
for SHELL_CONFIG in "${SHELL_CONFIGS[@]}"; do
if ! grep -q '\.local/bin' "$SHELL_CONFIG" 2>/dev/null; then
if ! grep -v '^[[:space:]]*#' "$SHELL_CONFIG" 2>/dev/null | grep -qE 'PATH=.*\.local/bin'; then
echo "" >> "$SHELL_CONFIG"
echo "# Hermes Agent — ensure ~/.local/bin is on PATH" >> "$SHELL_CONFIG"
echo "$PATH_LINE" >> "$SHELL_CONFIG"