diff options
Diffstat (limited to 'gnu')
-rw-r--r-- | gnu/installer.scm | 18 | ||||
-rw-r--r-- | gnu/installer/newt/final.scm | 5 | ||||
-rw-r--r-- | gnu/installer/newt/welcome.scm | 3 | ||||
-rw-r--r-- | gnu/installer/steps.scm | 8 |
4 files changed, 24 insertions, 10 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 diff --git a/gnu/installer/newt/final.scm b/gnu/installer/newt/final.scm index 6e55be5067..9f950a0551 100644 --- a/gnu/installer/newt/final.scm +++ b/gnu/installer/newt/final.scm @@ -92,9 +92,8 @@ a specific step, or restart the installer.")) ;; Keep going, the installer will be restarted later on. #t) (3 (raise - (condition - (&message - (message "User abort."))))))) + (condition + (&user-abort-error)))))) (_ (send-to-clients '(installation-failure)) #t))) diff --git a/gnu/installer/newt/welcome.scm b/gnu/installer/newt/welcome.scm index 5d47591d67..326996b005 100644 --- a/gnu/installer/newt/welcome.scm +++ b/gnu/installer/newt/welcome.scm @@ -145,8 +145,7 @@ first?")) (1 #t) (2 (raise (condition - (&message - (message "User abort."))))))) + (&user-abort-error)))))) (run-menu-page (G_ "GNU Guix install") (G_ "Welcome to GNU Guix system installer! diff --git a/gnu/installer/steps.scm b/gnu/installer/steps.scm index 8b25ae97c8..0c505e40e4 100644 --- a/gnu/installer/steps.scm +++ b/gnu/installer/steps.scm @@ -28,7 +28,10 @@ #:use-module (srfi srfi-34) #:use-module (srfi srfi-35) #:use-module (rnrs io ports) - #:export (<installer-step> + #:export (&user-abort-error + user-abort-error? + + <installer-step> installer-step make-installer-step installer-step? @@ -50,6 +53,9 @@ %current-result)) +(define-condition-type &user-abort-error &error + user-abort-error?) + ;; Hash table storing the step results. Use it only for logging and debug ;; purposes. (define %current-result (make-hash-table)) |