Repository navigation
nodeinfo: don't rely on jq being in PATH - #196
Merged
Merged
Conversation
seberm
marked this pull request as ready for review
November 1, 2026 19:57
seberm
marked this pull request as draft
November 1, 2026 20:23
sebsgent
force-pushed
the
nodeinfo-pin-jq
branch
from
November 1, 2026 21:02
1069a66 to
3e68e82
Compare
seberm
marked this pull request as ready for review
November 1, 2026 21:18
prusnak
approved these changes
Nov 1, 2026
nodeinfo pipes the lncli and lightning-cli output through a bare jq. That was safe while it was part of the secure-node preset, which installs jq, but nodeinfo can also be enabled on its own. Without jq it printed an empty nodeid and still exited 0, and the clightning id became @<onion address>. Use the store path, like the other modules that call jq. Assisted-by: Claude Code (Claude Opus 5.5)
seberm
force-pushed
the
nodeinfo-pin-jq
branch
from
November 1, 2026 22:04
3e68e82 to
af24bfb
Compare
seberm
enabled auto-merge
November 1, 2026 22:05
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Needed before #186.
nodeinfocalled a barejq, which onlysecure-node.nixinstalls. Without the preset,nodeinfoprinted"nodeid": ""for lnd and clightning, still exited 0, and the clightningidbecame@<onion address>. The test nodes always installjq, so CI didn't see it.This pins
${pkgs.jq}/bin/jq, like the other modules.lncli,lightning-cli,systemctlandbashstay bare: the system PATH provides them whenever these lines run.Tested with a temporary VM scenario (not part of this PR): lnd, clightning and
nodeinfowithout the preset,jqremoved from the system PATH. With this changenodeinforeturns both 66-character node IDs. On master the same scenario fails withjq: command not foundand no node IDs.