~ chicken-core (chicken-5) b2e6c5243dd469064bec947cb3b49dafaa1514e5


commit b2e6c5243dd469064bec947cb3b49dafaa1514e5
Author:     Evan Hanson <evhan@foldling.org>
AuthorDate: Tue Jan 19 20:36:16 2021 +1300
Commit:     Kooda <kooda@upyum.com>
CommitDate: Sat Mar 13 15:34:20 2021 +0100

    Allow "-cached" flag with chicken-install for local egg file
    
    Signed-off-by: Kooda <kooda@upyum.com>

diff --git a/chicken-install.mdoc b/chicken-install.mdoc
index 0bc1f788..c540e7e0 100644
--- a/chicken-install.mdoc
+++ b/chicken-install.mdoc
@@ -98,7 +98,7 @@ which has the same format as
 .Fl list No output.
 This option may be given multiple times.
 .It Fl cached
-Install given eggs from cache and do not download.
+Only install eggs from cache, do not download.
 .It Fl feature , Fl D Ar name
 Register feature 
 .Ar name ,
diff --git a/chicken-install.scm b/chicken-install.scm
index d1a57319..efcb47c1 100644
--- a/chicken-install.scm
+++ b/chicken-install.scm
@@ -429,7 +429,7 @@
     (cond ((or (not (probe-dir cached))
                (not (file-exists? eggfile)))
            (d "~a not cached~%" name)
-           (when cached-only (error "extension not cached"))
+           (when cached-only (error "extension not cached" name))
            (fetch #f))
           ((and (file-exists? status)
                 (not (equal? current-status 
@@ -1011,9 +1011,7 @@
         (purge-mode (purge-cache eggs))
         (print-repository (print (install-path)))
         ((null? eggs)
-         (cond (cached-only
-                 (error "`-cached' needs explicit egg list"))
-               (list-versions-only
+         (cond (list-versions-only
                  (print "no eggs specified"))
                (else
                  (let ((files (glob "*.egg" "chicken/*.egg")))
Trap