GNU bug report logs - #53063
[PATCH wip-harden-installer 00/14] General improvements to the installer

Previous Next

Package: guix-patches;

Reported by: Josselin Poiret <dev <at> jpoiret.xyz>

Date: Thu, 6 Jan 2022 22:47:01 UTC

Severity: normal

Tags: patch

Done: Mathieu Othacehe <othacehe <at> gnu.org>

Bug is archived. No further changes may be made.

Full log


Message #44 received at 53063 <at> debbugs.gnu.org (full text, mbox):

From: Josselin Poiret <dev <at> jpoiret.xyz>
To: 53063 <at> debbugs.gnu.org
Cc: Josselin Poiret <dev <at> jpoiret.xyz>
Subject: [PATCH wip-harden-installer 14/14] installer: Add confirmation page
 when running external commands.
Date: Thu,  6 Jan 2022 23:48:12 +0100
* gnu/installer/newt.scm (newt-run-command): Add it.
---
 gnu/installer/newt.scm | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/gnu/installer/newt.scm b/gnu/installer/newt.scm
index fc851339d1..4830667d4d 100644
--- a/gnu/installer/newt.scm
+++ b/gnu/installer/newt.scm
@@ -80,6 +80,16 @@ (define (exit-error file report key args)
   (clear-screen))
 
 (define (newt-run-command . args)
+  (define displayed-command
+    (string-join
+     (map (lambda (s) (string-append "\"" s "\"")) args)
+     " "))
+  (run-confirmation-page
+   (format #f "The installer will run the following command:~%~a~%"
+           displayed-command)
+   "External command"
+   #:exit-button-procedure (lambda ()
+                             (abort-to-prompt 'installer-step 'abort)))
   (newt-suspend)
   (clear-screen)
   (define result (run-command args))
-- 
2.34.0





This bug report was last modified 3 years and 201 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.