From eddebaeebf8168dfc31d6712b7a021e4df3b4e6a Mon Sep 17 00:00:00 2001 From: Armin Ronacher Date: Thu, 15 Oct 2026 15:49:34 +0200 Subject: [PATCH] fix(coding-agent): append Node to PATH in the Nix wrapper Shells started by the bash tool now keep the user's node/npm. Pi still runs on the pinned Node, which stays available as an npm fallback. closes #10519 --- nix/package.nix | 6 +++++- packages/coding-agent/CHANGELOG.md | 1 + 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/nix/package.nix b/nix/package.nix index 6027cd076..f99a5822e 100644 --- a/nix/package.nix +++ b/nix/package.nix @@ -118,12 +118,16 @@ stdenv.mkDerivation { mkdir -p "$out/lib/pi" "$out/bin" cp -R . "$out/lib/pi" + # The wrapper runs Pi with an absolute Node path. Node is only on PATH so Pi can + # find npm for package installs; append it so that shells started by the + # bash tool keep the user's node/npm (e.g. from mise or nvm). fd, ripgrep, + # and the clipboard tools are Pi's own dependencies and take precedence. makeWrapper ${nodejs}/bin/node "$out/bin/pi" \ --add-flags "$out/lib/pi/node_modules/@earendil-works/pi-coding-agent/dist/bundle/cli.js" \ + --suffix PATH : ${lib.makeBinPath [ nodejs ]} \ --prefix PATH : ${ lib.makeBinPath ( [ - nodejs fd ripgrep ] diff --git a/packages/coding-agent/CHANGELOG.md b/packages/coding-agent/CHANGELOG.md index 625286550..8def7b513 100644 --- a/packages/coding-agent/CHANGELOG.md +++ b/packages/coding-agent/CHANGELOG.md @@ -14,6 +14,7 @@ - Fixed repeated codemode timeouts or aborts accumulating surviving workers; admission now limits live workers to two across sessions, counting cancelled workers until actual exit ([#10748](https://github.com/earendil-works/pi/issues/10748)) - Fixed `--model` choosing a provider by catalog order when several providers offer the match; Pi now prefers the provider with credentials and otherwise reports the ambiguity. `--models` and `enabledModels` add a model for each provider that offers it and warn about the ambiguity ([#10160](https://github.com/earendil-works/pi/issues/10160)) - Fixed `read` line-range labels for numeric-string or null arguments in the TUI, session tree, HTML exports, and examples ([#9887](https://github.com/earendil-works/pi/issues/9887)) +- Fixed the Nix package putting its Node.js first on `PATH`, which made bash tool shells use Pi's Node instead of the user's `node`/`npm`. Pi's Node is now only a fallback ([#10519](https://github.com/earendil-works/pi/issues/10519)) - Fixed prompt templates dropping empty quoted arguments (`""` or `''`), which shifted later positional arguments and prevented positional defaults from applying ([#10867](https://github.com/earendil-works/pi/issues/10867)) ## [1.2.0] - 2026-10-12