summary refs log tree commit diff
path: root/gnu/installer/final.scm
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2019-04-26 13:56:22 +0200
committerLudovic Courtès <ludo@gnu.org>2019-04-26 14:19:36 +0200
commit9529f7850e3ae91cce70620e684fc6d0dc25e815 (patch)
treec965c7e8a5f3bb41343114528be90c1c6c207ecc /gnu/installer/final.scm
parent6c849cdb988d403fec11ace82704535723de9e66 (diff)
downloadguix-9529f7850e3ae91cce70620e684fc6d0dc25e815.tar.gz
installer: Take 'guix system init' exit code into account.
This allows the installer to distinguish success from failure, and also
ensures the shell that runs 'guix system init' exits upon completion.

* gnu/installer/utils.scm (run-shell-command)[pause]: New procedure.
Add "exec" before COMMAND in the script.  Guard 'invoke' call and handle
'invoke-error?'.  Add call to 'pause' on completion.
* gnu/installer/final.scm (install-system): Remove 'false-if-exception'.
Diffstat (limited to 'gnu/installer/final.scm')
-rw-r--r--gnu/installer/final.scm5
1 files changed, 2 insertions, 3 deletions
diff --git a/gnu/installer/final.scm b/gnu/installer/final.scm
index bf68a5aa2c..c41670c197 100644
--- a/gnu/installer/final.scm
+++ b/gnu/installer/final.scm
@@ -99,7 +99,7 @@ USERS."
   "Create /etc/shadow and /etc/passwd on the installation target for USERS.
 Start COW-STORE service on target directory and launch guix install command in
 a subshell.  LOCALE must be the locale name under which that command will run,
-or #f."
+or #f.  Return #t on success and #f on failure."
   (let ((install-command
          (format #f "guix system init ~a ~a"
                  (%installer-configuration-file)
@@ -114,5 +114,4 @@ or #f."
     (create-user-database users (%installer-target-dir))
 
     (start-service 'cow-store (list (%installer-target-dir)))
-    (false-if-exception (run-shell-command install-command
-                                           #:locale locale))))
+    (run-shell-command install-command #:locale locale)))