>From dcafadc2401850cca09a171f838c2e6c521980b0 Mon Sep 17 00:00:00 2001 From: Evan Hanson Date: Mon, 23 Jul 2018 11:20:05 +1200 Subject: [PATCH 1/2] Handle exceptions from `terminal-size' in chicken-status This fixes chicken-status on the MinGW platform where `terminal-size' will raise a (previously unhandled) exception. --- chicken-status.scm | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/chicken-status.scm b/chicken-status.scm index fd8bd19d..777b6f0d 100644 --- a/chicken-status.scm +++ b/chicken-status.scm @@ -27,6 +27,7 @@ (import (scheme) (chicken base) + (chicken condition) (chicken file) (chicken file posix) (chicken fixnum) @@ -53,7 +54,7 @@ (lambda () (let ((cop (current-output-port))) (if (terminal-port? cop) - (let ((w (nth-value 1 (terminal-size cop)))) + (let ((w (handle-exceptions exn 0 (nth-value 1 (terminal-size cop))))) (if (zero? w) default-width (min default-width w))) -- 2.11.0