mes: Fix -c, --command.

* mes/module/mes/boot-0.scm: Prepend 'begin to expr list.
This commit is contained in:
Jan Nieuwenhuizen 2019-10-10 13:22:12 +02:00
parent 8d49b40b13
commit 092626243a
No known key found for this signature in database
GPG key ID: F3C1A0D9C1D65273

View file

@ -265,7 +265,7 @@ General help using GNU software: <http://gnu.org/gethelp/>
(setenv "GUILE_LOAD_PATH" (string-append dir ":" (getenv "GUILE_LOAD_PATH"))))) (setenv "GUILE_LOAD_PATH" (string-append dir ":" (getenv "GUILE_LOAD_PATH")))))
(when command (when command
(let* ((prev (set-current-input-port (open-input-string command))) (let* ((prev (set-current-input-port (open-input-string command)))
(expr (read-input-file-env (current-module))) (expr (cons 'begin (read-input-file-env (current-module))))
(set-current-input-port prev)) (set-current-input-port prev))
(primitive-eval expr) (primitive-eval expr)
(exit 0))) (exit 0)))