diff options
author | Ludovic Courtès <ludo@gnu.org> | 2020-02-19 22:47:56 +0100 |
---|---|---|
committer | Ludovic Courtès <ludo@gnu.org> | 2020-03-05 23:40:23 +0100 |
commit | 8a4b11c6a911effddf4cac4b33f5c3c70392b797 (patch) | |
tree | 31d7ecdc17ab4cb2555b2a39a92b227f4ebd6aa2 /gnu/installer/final.scm | |
parent | f901f5d2bc7ed37235ea8b4c51fde80c227234bb (diff) | |
download | guix-8a4b11c6a911effddf4cac4b33f5c3c70392b797.tar.gz |
installer: Run commands without hopping through the shell.
* gnu/installer/utils.scm (run-shell-command): Rename to... (run-command): Remove call to 'call-with-temporary-output-file' and hop through Bash. Expect COMMAND to be a list of strings rather than a string. * gnu/installer/final.scm (install-system): Turn INSTALL-COMMAND into a list of strings and pass it to 'run-command'. * gnu/installer/newt/page.scm (edit-file): Likewise.
Diffstat (limited to 'gnu/installer/final.scm')
-rw-r--r-- | gnu/installer/final.scm | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/gnu/installer/final.scm b/gnu/installer/final.scm index 8c2185e36f..7193ecb8a4 100644 --- a/gnu/installer/final.scm +++ b/gnu/installer/final.scm @@ -1,6 +1,6 @@ ;;; GNU Guix --- Functional package management for GNU ;;; Copyright © 2018, 2020 Mathieu Othacehe <m.othacehe@gmail.com> -;;; Copyright © 2019 Ludovic Courtès <ludo@gnu.org> +;;; Copyright © 2019, 2020 Ludovic Courtès <ludo@gnu.org> ;;; ;;; This file is part of GNU Guix. ;;; @@ -111,10 +111,9 @@ cow-store service." 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. Return #t on success and #f on failure." - (let ((install-command - (format #f "guix system init --fallback ~a ~a" - (%installer-configuration-file) - (%installer-target-dir)))) + (let ((install-command (list "guix" "system" "init" "--fallback" + (%installer-configuration-file) + (%installer-target-dir)))) (mkdir-p (%installer-target-dir)) ;; We want to initialize user passwords but we don't want to store them in @@ -128,7 +127,7 @@ or #f. Return #t on success and #f on failure." (lambda () (start-service 'cow-store (list (%installer-target-dir)))) (lambda () - (run-shell-command install-command #:locale locale)) + (run-command install-command #:locale locale)) (lambda () (stop-service 'cow-store) ;; Remove the store overlay created at cow-store service start. |