Ticket #683: bug683.patch

File bug683.patch, 1.0 KB (added by Christian Kellermann, 13 years ago)
  • chicken-install.scm

    From 3e09a0c2765c437512918af448ac567e0e866529 Mon Sep 17 00:00:00 2001
    From: Christian Kellermann <ckeen@pestilenz.org>
    Date: Thu, 22 Sep 2011 23:41:30 +0200
    Subject: [PATCH] Error out if given nonexistant egg name
    
    ---
     chicken-install.scm |    4 +++-
     1 files changed, 3 insertions(+), 1 deletions(-)
    
    diff --git a/chicken-install.scm b/chicken-install.scm
    index 5d1499f..9936344 100644
    a b  
    426426              (let ((name (if (pair? egg) (car egg) egg))
    427427                    (version (override-version egg)))
    428428                (let-values (((dir ver) (try-default-sources name version)))
    429                   (unless dir (error "extension or version not found"))
     429                  (when (or (not dir)
     430                            (null? (find-files dir)))
     431                    (error "extension or version not found"))
    430432                  (print " " name " located at " dir)
    431433                  (set! *eggs+dirs+vers* (cons (list name dir ver) *eggs+dirs+vers*)) ) ) ] ) )
    432434     eggs)