~ chicken-core (chicken-5) 5d61840f7d49ee704aa662dde10bece561828054
commit 5d61840f7d49ee704aa662dde10bece561828054 Author: felix <felix@call-with-current-continuation.org> AuthorDate: Wed May 30 10:55:50 2018 +0200 Commit: Peter Bex <peter@more-magic.net> CommitDate: Sat Jun 2 07:57:56 2018 +0200 chicken-uninstall: show helpful msg when asking for confirmation and stdin is EOF Signed-off-by: Peter Bex <peter@more-magic.net> diff --git a/chicken-uninstall.scm b/chicken-uninstall.scm index bc5e2aa9..6a692c83 100644 --- a/chicken-uninstall.scm +++ b/chicken-uninstall.scm @@ -85,10 +85,13 @@ (let loop () (display "Do you want to proceed? (yes/no) ") (flush-output) - (let ((r (trim (read-line)))) - (cond ((string=? r "yes")) - ((string=? r "no") (fini 1)) - (else (loop)))))) + (let ((a (read-line))) + (when (eof-object? a) + (error "EOF - use `-force' to proceed anyway")) + (let ((r (trim a))) + (cond ((string=? r "yes")) + ((string=? r "no") (fini 1)) + (else (loop))))))) (define (trim str) (define (left lst)Trap