mirror of
https://codeberg.org/guix/guix.git
synced 2025-10-02 02:15:12 +00:00
ui: 'display-hint' quotes extra arguments for Texinfo.
Fixes <https://issues.guix.gnu.org/61201>. Previously, common practice was to splice arbitrary strings (user names, file names, etc.) into Texinfo snippets passed to 'display-hint'. This is unsafe in the general case because at signs and braces need to be escaped to produced valid Texinfo. This commit addresses that. * guix/ui.scm (texinfo-quote): New procedure. (display-hint): When ARGUMENTS is non-empty, pass it to 'texinfo-quote' and call 'format'. (report-unbound-variable-error, check-module-matches-file) (display-collision-resolution-hint, run-guix-command): Remove explicit 'format' call; pass 'format' arguments as extra arguments to 'display-hint'. * gnu/services/monitoring.scm (zabbix-front-end-config): Likewise. * guix/scripts.scm (warn-about-disk-space): Likewise. * guix/scripts/build.scm (%standard-cross-build-options) (%standard-native-build-options): Likewise. * guix/scripts/describe.scm (display-checkout-info): Likewise. * guix/scripts/environment.scm (suggest-command-name): Likewise. * guix/scripts/home.scm (process-command): Likewise. * guix/scripts/home/edit.scm (service-type-not-found): Likewise. * guix/scripts/import.scm (guix-import): Likewise. * guix/scripts/package.scm (display-search-path-hint): Likewise. * guix/scripts/pull.scm (build-and-install): Likewise. * guix/scripts/shell.scm (auto-detect-manifest): Likewise. * guix/scripts/system.scm (check-file-system-availability): Likewise. (guix-system): Likewise. * guix/scripts/system/edit.scm (service-type-not-found): Likewise. * guix/status.scm (print-build-event): Likewise.
This commit is contained in:
parent
92a0e60a96
commit
43c36c5c9f
15 changed files with 85 additions and 64 deletions
|
@ -1,5 +1,5 @@
|
|||
;;; GNU Guix --- Functional package management for GNU
|
||||
;;; Copyright © 2013-2015, 2017-2022 Ludovic Courtès <ludo@gnu.org>
|
||||
;;; Copyright © 2013-2015, 2017-2023 Ludovic Courtès <ludo@gnu.org>
|
||||
;;; Copyright © 2017 Marius Bakke <mbakke@fastmail.com>
|
||||
;;; Copyright © 2020, 2021 Tobias Geerinckx-Rice <me@tobias.gr>
|
||||
;;;
|
||||
|
@ -469,9 +469,9 @@ true, display what would be built without actually building it."
|
|||
;; Is the 'guix' command previously in $PATH the same as the new
|
||||
;; one? If the answer is "no", then suggest 'hash guix'.
|
||||
(unless (member guix-command new)
|
||||
(display-hint (format #f (G_ "After setting @code{PATH}, run
|
||||
(display-hint (G_ "After setting @code{PATH}, run
|
||||
@command{hash guix} to make sure your shell refers to @file{~a}.")
|
||||
(first new))))
|
||||
(first new)))
|
||||
(return #f))
|
||||
(return #f)))))
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue