raco pkg: make search-ask mode work for Windows (CRLF)

More generally, trim leading an dtrailing whitespace from answers.
This commit is contained in:
Matthew Flatt 2013-08-19 07:15:50 -06:00
parent 5efab46f5a
commit 31c7101ec7

View File

@ -1155,7 +1155,7 @@
(printf question) (printf question)
(printf " [Y/n/a/?] ") (printf " [Y/n/a/?] ")
(flush-output) (flush-output)
(match (read-line) (match (string-trim (read-line (current-input-port) 'any))
[(or "y" "Y" "") [(or "y" "Y" "")
'yes] 'yes]
[(or "n" "N") [(or "n" "N")