aboutsummaryrefslogtreecommitdiff
path: root/guix/build
diff options
context:
space:
mode:
Diffstat (limited to 'guix/build')
-rw-r--r--guix/build/syscalls.scm10
1 files changed, 6 insertions, 4 deletions
diff --git a/guix/build/syscalls.scm b/guix/build/syscalls.scm
index ed833c10b2..5ce0abbb48 100644
--- a/guix/build/syscalls.scm
+++ b/guix/build/syscalls.scm
@@ -915,10 +915,12 @@ always a positive integer."
(catch 'system-error
(lambda ()
- (match (window-size-columns (terminal-window-size port))
- ;; Things like Emacs shell-mode return 0, which is unreasonable.
- (0 (fall-back))
- ((? number? columns) columns)))
+ (if (file-port? port)
+ (match (window-size-columns (terminal-window-size port))
+ ;; Things like Emacs shell-mode return 0, which is unreasonable.
+ (0 (fall-back))
+ ((? number? columns) columns))
+ (fall-back)))
(lambda args
(let ((errno (system-error-errno args)))
(if (= errno ENOTTY)