[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[bug#53063] [PATCH wip-harden-installer 14/14] installer: Add confirmati
From: |
Josselin Poiret |
Subject: |
[bug#53063] [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
- [bug#53063] [PATCH v2 wip-harden-installer 15/18] installer: Add error page when running external commands., (continued)
- [bug#53063] [PATCH v2 wip-harden-installer 15/18] installer: Add error page when running external commands., Josselin Poiret, 2022/01/15
- [bug#53063] [PATCH v2 wip-harden-installer 18/18] installer: Make dump archive creation optional and selective., Josselin Poiret, 2022/01/15
- [bug#53063] [PATCH v2 wip-harden-installer 01/18] installer: Use define instead of let at top-level., Josselin Poiret, 2022/01/15
- [bug#53063] [PATCH v2 wip-harden-installer 16/18] installer: Use dynamic-wind to setup installer., Josselin Poiret, 2022/01/15
- [bug#53063] [PATCH v2 wip-harden-installer 17/18] installer: Turn passwords into opaque records., Josselin Poiret, 2022/01/15
- [bug#53063] [PATCH wip-harden-installer 00/14] General improvements to the installer, Mathieu Othacehe, 2022/01/17
- [bug#53063] [PATCH wip-harden-installer 10/14] installer: Raise condition when mklabel fails., Josselin Poiret, 2022/01/06
- [bug#53063] [PATCH wip-harden-installer 09/14] installer: Use the command capturing facility for guix init., Josselin Poiret, 2022/01/06
- [bug#53063] [PATCH wip-harden-installer 12/14] installer: Replace run-command by invoke in newt/page.scm., Josselin Poiret, 2022/01/06
- [bug#53063] [PATCH wip-harden-installer 11/14] installer: Fix run-file-textbox-page when edit-button is #f., Josselin Poiret, 2022/01/06
- [bug#53063] [PATCH wip-harden-installer 14/14] installer: Add confirmation page when running external commands.,
Josselin Poiret <=
- [bug#53063] [PATCH wip-harden-installer 13/14] installer: Use named prompt to abort or break installer steps., Josselin Poiret, 2022/01/06