raco pkg show: mention auto-installed when no non-auto are installed

In the case that packages are only auto-installed in a particular
scope, `raco pkg show` should just say "[none]", instead of adding the
note about auto-installed packages that are not being shown.
This commit is contained in:
Matthew Flatt 2014-12-16 08:26:09 -07:00
parent f8c6090d37
commit 2b62ffe90b

View File

@ -65,7 +65,6 @@
empty))))
(if (null? to-show)
(printf " [none]\n")
(begin
(table-display
long?
(list* 'right 'right 'middle
@ -77,7 +76,7 @@
"Checksum"
"Source"
(if dir? '("Directory") '()))
to-show))
to-show)))
(unless (or only-pkgs show-auto?)
(define n (for/sum ([pkg (in-list pkgs)]
#:when (pkg-info-auto? (hash-ref db pkg)))
@ -86,7 +85,7 @@
(printf "~a[~a auto-installed package~a not shown]\n"
indent
n
(if (= n 1) "" "s")))))))
(if (= n 1) "" "s")))))
(define (table-display long? dots-poses l)
(define how-many-cols (length (first l)))