mirror of
https://github.com/langchain-ai/deepagents.git
synced 2026-07-21 09:15:22 -04:00
aad530c099
The installer no longer prints a spurious "shadowing install" warning when `~/.local/bin` appears on `PATH` under a non-normalized alias (such as `~/.local/share/../bin`) that resolves to the same directory. --- The `deepagents-code` installer printed a spurious "shadowing install" warning on every run for users whose `PATH` contains a non-normalized alias of `~/.local/bin` — most commonly `~/.local/share/../bin`, where `share/..` collapses back to `.local`. Some third-party tools write that un-normalized spelling into a shell profile (derived from `$XDG_DATA_HOME/../bin`), and it can sort before the canonical entry. Both spellings resolve to the same uv-tool symlink the installer just created, but `detect_shadowing_install` compared `PATH` strings, so the alias looked like a separate, older install. The primary fix makes the guard compare by inode using bash's `-ef` test (same device+inode, resolves `..` and symlinks) in addition to the existing string equality, so same-file aliases short-circuit and never warn. Both operands are guaranteed to exist at that point, and a genuinely different binary at a distinct inode still fails `-ef` and correctly warns, so only the false positive is suppressed. Secondarily, `local_bin_in_profile` now also recognizes the `~/.local/share/../bin` spelling so the installer doesn't append a duplicate `~/.local/bin` PATH line; this covers the common alias only and isn't a full path normalizer. Made by [Open SWE](https://openswe.vercel.app/agents/870c16ab-41c7-3eee-e0d1-55385367ec4f) --------- Co-authored-by: open-swe[bot] <open-swe@users.noreply.github.com>