From 21fcfe1ee969cc477dc41486ae4074e655d44274 Mon Sep 17 00:00:00 2001 From: Ludovic Courtès Date: Sat, 16 Mar 2019 17:09:19 +0100 Subject: bootloader: Use 'invoke/quiet' when running 'grub-install' and co. This hides potentially confusing GRUB messages from the user, such as "Installing for i386-pc platform." * gnu/bootloader/extlinux.scm (install-extlinux): Use 'invoke/quiet' instead of 'system*' and 'error'. * gnu/bootloader/grub.scm (install-grub, install-grub-efi): Likewise. * guix/scripts/system.scm (bootloader-installer-script): Guard against 'message-condition?' and handle them properly. --- guix/scripts/system.scm | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) (limited to 'guix/scripts') diff --git a/guix/scripts/system.scm b/guix/scripts/system.scm index d67b9f8185..b4bf66819f 100644 --- a/guix/scripts/system.scm +++ b/guix/scripts/system.scm @@ -808,8 +808,17 @@ and TARGET arguments." #~(begin (use-modules (gnu build bootloader) (guix build utils) - (ice-9 binary-ports)) - (#$installer #$bootloader #$device #$target))))) + (ice-9 binary-ports) + (srfi srfi-34) + (srfi srfi-35)) + + (guard (c ((message-condition? c) ;XXX: i18n + (format (current-error-port) "error: ~a~%" + (condition-message c)) + (exit 1))) + (#$installer #$bootloader #$device #$target) + (format #t "bootloader successfully installed on '~a'~%" + device)))))) (define* (perform-action action os #:key skip-safety-checks? -- cgit v1.2.3