~ chicken-core (chicken-5) 224377d390456d9bd4ee5f43f44cea7c0872a08e
commit 224377d390456d9bd4ee5f43f44cea7c0872a08e Author: felix <felix@call-with-current-continuation.org> AuthorDate: Mon Oct 30 14:00:41 2023 +0100 Commit: Mario Domenech Goulart <mario@parenteses.org> CommitDate: Mon Oct 30 20:32:13 2023 +0100 handle case when egg-info file is empty Signed-off-by: Mario Domenech Goulart <mario@parenteses.org> diff --git a/egg-information.scm b/egg-information.scm index 6f5f7cb9..4e6c6f2f 100644 --- a/egg-information.scm +++ b/egg-information.scm @@ -34,8 +34,11 @@ (if (file-exists? fname*) fname* fname))) (define (load-egg-info fname) - (let ((fname (locate-egg-file fname))) - (with-input-from-file fname read))) + (let* ((fname (locate-egg-file fname)) + (info (with-input-from-file fname read))) + (if (eof-object? info) + (error "empty egg-info file, possibly due to an aborted egg-install - please remove the file and reinstall the corresponding egg" fname) + info))) ;;; lookup specific toplevel properties of egg-informationTrap