profile: invalidate PATH cache when base PATH changes

Store the base PATH alongside the cached result so the cache is
only used when the pre-modification PATH still matches.  This
prevents stale entries when the shell inherits a different base
PATH (e.g. inside tmux or after system updates).

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This commit is contained in:
2026-02-24 16:10:12 +00:00
parent 6fd897b8b5
commit 7d2825f9d1
2 changed files with 12 additions and 8 deletions

View File

@@ -40,6 +40,6 @@ mkdir -p "$HOME/.ssh"
stow --dir="$root_dir" --target="$HOME" home
# Bust PATH cache to force regeneration with new profile
# Bust PATH cache to force rebuild with new profile
rm -f "${XDG_CACHE_HOME:-$HOME/.cache}/dots/path"