diff options
author | Ludovic Courtès <ludo@gnu.org> | 2022-04-01 16:54:52 +0200 |
---|---|---|
committer | Ludovic Courtès <ludo@gnu.org> | 2022-04-08 23:59:48 +0200 |
commit | 13307c198bcd1fbd9364bcb7ef4c6d19d287cf2c (patch) | |
tree | 29cbc8bf6b28c059a24eee87ecd4e06a643248e7 | |
parent | 3da62bf5aa358667621c8c390c755c5bfa45a93f (diff) | |
download | guix-13307c198bcd1fbd9364bcb7ef4c6d19d287cf2c.tar.gz |
diagnostics: Turn diagnostic locations into hyperlinks.
* guix/diagnostics.scm (print-diagnostic-prefix): Use 'location->hyperlink' when 'supports-hyperlinks?' returns true.
-rw-r--r-- | guix/diagnostics.scm | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/guix/diagnostics.scm b/guix/diagnostics.scm index 2b8cee1ccb..bf1ced8140 100644 --- a/guix/diagnostics.scm +++ b/guix/diagnostics.scm @@ -204,7 +204,10 @@ macro-expansion time." (gettext prefix %gettext-domain)))) (if location (format (guix-warning-port) "~a: ~a" - (location-color (location->string location)) + (location-color + (if (supports-hyperlinks? (guix-warning-port)) + (location->hyperlink location) + (location->string location))) (prefix-color prefix)) (format (guix-warning-port) "~:[~*~;guix ~a: ~]~a" (program-name) (program-name) |