mirror of
https://github.com/harivansh-afk/nix.git
synced 2026-04-15 09:01:16 +00:00
fix agent-browser PATH: add npm global bin to zsh path
- Add npm global bin dir to zsh path array so agent-browser (and other npm -g binaries) are found in interactive shells - Fix activation check to look for the binary at the actual npm prefix path instead of relying on command -v with wrong PATH
This commit is contained in:
parent
92b13153e9
commit
8cf74b95be
2 changed files with 3 additions and 1 deletions
|
|
@ -21,7 +21,8 @@ lib.mkIf (!hostConfig.isDarwin) {
|
||||||
]
|
]
|
||||||
}:$PATH"
|
}:$PATH"
|
||||||
|
|
||||||
if ! command -v agent-browser >/dev/null 2>&1; then
|
npm_bin="$(npm prefix -g 2>/dev/null)/bin"
|
||||||
|
if [ ! -x "$npm_bin/agent-browser" ]; then
|
||||||
npm install -g agent-browser 2>/dev/null || true
|
npm install -g agent-browser 2>/dev/null || true
|
||||||
fi
|
fi
|
||||||
'';
|
'';
|
||||||
|
|
|
||||||
|
|
@ -83,6 +83,7 @@
|
||||||
"$BUN_INSTALL/bin"
|
"$BUN_INSTALL/bin"
|
||||||
"$HOME/.antigravity/antigravity/bin"
|
"$HOME/.antigravity/antigravity/bin"
|
||||||
"$HOME/.opencode/bin"
|
"$HOME/.opencode/bin"
|
||||||
|
"$(npm prefix -g 2>/dev/null)/bin"
|
||||||
"${pkgs.postgresql_17}/bin"
|
"${pkgs.postgresql_17}/bin"
|
||||||
"$HOME/.nix-profile/bin"
|
"$HOME/.nix-profile/bin"
|
||||||
"/run/wrappers/bin"
|
"/run/wrappers/bin"
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue