guix graph: 'guix graph --path' correctly handles multiple outputs.

Previously, "guix graph -t references --path guix guile" would fail
with:

  error: '--path' option requires exactly two nodes (given 2)

This is because '_' in the 'match' clause wouldn't match the
placeholder and would instead be interested as a variable name, thereby
meaning NODES is expected to have two lists with the same tail.

* guix/scripts/graph.scm (guix-graph): Rename '_' in 'mlet' to '_g' so
that the literal '_' used in 'match' below matches.
This commit is contained in:
Ludovic Courtès 2023-01-13 23:31:16 +01:00
parent 3bfbfa2946
commit a4a35e123b
No known key found for this signature in database
GPG key ID: 090B11993D9AEBB5

View file

@ -598,7 +598,7 @@ (define type
(run-with-store store
;; XXX: Since grafting can trigger unsolicited builds, disable it.
(mlet %store-monad ((_ (set-grafting #f))
(mlet %store-monad ((_g (set-grafting #f))
(nodes (mapm %store-monad
(node-type-convert type)
(reverse items))))