mirror of
https://git.in.rschanz.org/ryan77627/guix.git
synced 2025-01-25 20:19:18 -05:00
remote: Make sure the user doesn't mess up with the REPL protocol.
Reported by zerodaysfordays@sdf.lonestar.org (Jakob L. Kreuze). * guix/remote.scm (trampoline): Wrap 'primitive-load' in 'with-output-to-port'.
This commit is contained in:
parent
5db07b971d
commit
6f8eb9f1d8
1 changed files with 7 additions and 1 deletions
|
@ -76,8 +76,14 @@ (define program
|
|||
(with-imported-modules (source-module-closure '((guix repl)))
|
||||
#~(begin
|
||||
(use-modules (guix repl))
|
||||
(send-repl-response '(primitive-load #$program)
|
||||
|
||||
;; We use CURRENT-OUTPUT-PORT for REPL messages, so redirect PROGRAM's
|
||||
;; output to CURRENT-ERROR-PORT so that it does not interfere.
|
||||
(send-repl-response '(with-output-to-port (current-error-port)
|
||||
(lambda ()
|
||||
(primitive-load #$program)))
|
||||
(current-output-port))
|
||||
|
||||
(force-output))))
|
||||
|
||||
(define* (remote-eval exp session
|
||||
|
|
Loading…
Reference in a new issue