aboutsummaryrefslogtreecommitdiff
path: root/guix/inferior.scm
diff options
context:
space:
mode:
authorChristopher Baines <mail@cbaines.net>2019-10-02 19:14:05 +0100
committerChristopher Baines <mail@cbaines.net>2019-10-15 19:01:50 +0100
commitef0c265438149691d980ce17f0c5aaea5e8f6b77 (patch)
tree1d02764aa143e7c7219685ceeea19d528144cf39 /guix/inferior.scm
parentf0428c18f85692f11ddd28fc12e949c420e971c9 (diff)
downloadguix-ef0c265438149691d980ce17f0c5aaea5e8f6b77.tar
guix-ef0c265438149691d980ce17f0c5aaea5e8f6b77.tar.gz
inferior: Set the error port when using older Guix versions.
This makes the behaviour more consistent. * guix/inferior.scm (inferior-pipe): Wrap the second open-pipe* call with with-error-to-port, to match the first call to open-pipe*.
Diffstat (limited to 'guix/inferior.scm')
-rw-r--r--guix/inferior.scm28
1 files changed, 15 insertions, 13 deletions
diff --git a/guix/inferior.scm b/guix/inferior.scm
index eecdbdd5ca..b8e2f21f42 100644
--- a/guix/inferior.scm
+++ b/guix/inferior.scm
@@ -125,19 +125,21 @@ it's an old Guix."
;; Older versions of Guix didn't have a 'guix repl' command, so
;; emulate it.
- (open-pipe* OPEN_BOTH "guile"
- "-L" (string-append directory "/share/guile/site/"
- (effective-version))
- "-C" (string-append directory "/share/guile/site/"
- (effective-version))
- "-C" (string-append directory "/lib/guile/"
- (effective-version) "/site-ccache")
- "-c"
- (object->string
- `(begin
- (primitive-load ,(search-path %load-path
- "guix/repl.scm"))
- ((@ (guix repl) machine-repl))))))
+ (with-error-to-port error-port
+ (lambda ()
+ (open-pipe* OPEN_BOTH "guile"
+ "-L" (string-append directory "/share/guile/site/"
+ (effective-version))
+ "-C" (string-append directory "/share/guile/site/"
+ (effective-version))
+ "-C" (string-append directory "/lib/guile/"
+ (effective-version) "/site-ccache")
+ "-c"
+ (object->string
+ `(begin
+ (primitive-load ,(search-path %load-path
+ "guix/repl.scm"))
+ ((@ (guix repl) machine-repl))))))))
pipe)))
(define* (port->inferior pipe #:optional (close close-port))