From 31c7101ec7d8cc302f7dfb99d735594d23e77cfb Mon Sep 17 00:00:00 2001 From: Matthew Flatt Date: Mon, 19 Aug 2013 07:15:50 -0600 Subject: [PATCH] raco pkg: make `search-ask` mode work for Windows (CRLF) More generally, trim leading an dtrailing whitespace from answers. --- racket/collects/pkg/lib.rkt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/racket/collects/pkg/lib.rkt b/racket/collects/pkg/lib.rkt index 944968ce1a..9034896a6b 100644 --- a/racket/collects/pkg/lib.rkt +++ b/racket/collects/pkg/lib.rkt @@ -1155,7 +1155,7 @@ (printf question) (printf " [Y/n/a/?] ") (flush-output) - (match (read-line) + (match (string-trim (read-line (current-input-port) 'any)) [(or "y" "Y" "") 'yes] [(or "n" "N")