summaryrefslogtreecommitdiff
path: root/gnu/installer.scm
diff options
context:
space:
mode:
authorMathieu Othacehe <othacehe@gnu.org>2022-10-31 16:43:09 +0100
committerMathieu Othacehe <othacehe@gnu.org>2022-11-02 15:52:19 +0100
commit62a3756bd90c922c701e899a6c01c556d8e3c75a (patch)
treec5e490eacd4c568a15caef6c373109f4b894c948 /gnu/installer.scm
parent80387bc7c3966602800116f5be3893c3d3044a96 (diff)
installer: Skip the backtrace page on user abort.
When the user aborts the installation because a core dump is discovered or the installation command failed, displaying the abort backtrace doesn't make much sense. Hide it when the abort condition is &user-abort-error and skip directly to the dump page. * gnu/installer/steps.scm (&user-abort-error): New variable. (user-abort-error?): New procedure. * gnu/installer/newt/final.scm (run-install-failed-page): Raise a user-abort-error. * gnu/installer/newt/welcome.scm (run-welcome-page): Ditto. * gnu/installer.scm (installer-program): Hide the backtrace page and directly propose to dump the report when the a &user-abort-error is raised.
Diffstat (limited to 'gnu/installer.scm')
-rw-r--r--gnu/installer.scm18
1 files changed, 14 insertions, 4 deletions
diff --git a/gnu/installer.scm b/gnu/installer.scm
index 52c595b5b7..5cd1af8edf 100644
--- a/gnu/installer.scm
+++ b/gnu/installer.scm
@@ -453,11 +453,21 @@ selected keymap."
key args)
(define dump-dir
(prepare-dump key args #:result %current-result))
+
+ (define user-abort?
+ (match args
+ (((? user-abort-error? obj)) #t)
+ (_ #f)))
+
(define action
- ((installer-exit-error current-installer)
- (get-string-all
- (open-input-file
- (string-append dump-dir "/installer-backtrace")))))
+ (if user-abort?
+ 'dump
+ ((installer-exit-error current-installer)
+ (get-string-all
+ (open-input-file
+ (string-append dump-dir
+ "/installer-backtrace"))))))
+
(match action
('dump
(let* ((dump-files