summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--guix/profiles.scm8
1 files changed, 4 insertions, 4 deletions
diff --git a/guix/profiles.scm b/guix/profiles.scm
index 9dc9ab43b9..aa88b849e1 100644
--- a/guix/profiles.scm
+++ b/guix/profiles.scm
@@ -321,10 +321,10 @@ replacement if PORT is not Unicode-capable."
     (let ((arrow "→"))
       (catch 'encoding-error
         (lambda ()
-          (with-fluids ((%default-port-conversion-strategy 'error))
-            (with-output-to-string
-              (lambda ()
-                (display arrow)))))
+          (call-with-output-string
+            (lambda (port)
+              (set-port-conversion-strategy! port 'error)
+              (display arrow port))))
         (lambda (key . args)
           "->")))))