Browse files

Clean up 'panda info' output and include saved info for installed pro…

…jects
  • Loading branch information...
1 parent 1c443a5 commit 500690cf2b8f9bca424f34613b11759f1ed5a0f4 @japhb japhb committed Aug 21, 2012
Showing with 10 additions and 4 deletions.
  1. +10 −4 bin/panda
View
14 bin/panda
@@ -51,21 +51,27 @@ sub projectinfo($panda, @args) {
for @args -> $p {
my $x = $panda.ecosystem.get-project($p);
if $x {
+ my $state = $panda.ecosystem.project-get-state($x);
+ say 'PROJECT LIST:';
say $x.name => $x.version;
- say "Depends on:" => $x.dependencies.Str if $x.dependencies;
- given $panda.ecosystem.project-get-state($x) {
+ say 'Depends on:' => $x.dependencies.Str if $x.dependencies;
+ given $state {
when 'installed' {
- say "State:\t\tinstalled";
+ say 'State' => 'installed';
}
when 'installed-dep' {
- say "State:\t\tinstalled as a dependency";
+ say 'State' => 'installed as a dependency';
}
}
for $x.metainfo.kv -> $k, $v {
if $k ~~ none('version', 'name', 'depends') {
say $k.ucfirst => $v;
}
}
+ if $state ~~ /^ 'installed' / {
+ say 'INSTALLED VERSION:';
+ .say for $panda.ecosystem.project-get-saved-meta($x).pairs.sort;
+ }
say '';
} else {
say "Project '$p' not found"

0 comments on commit 500690c

Please sign in to comment.