Skip to content

Commit

Permalink
Implement --nodeps and --notests, fixes GH-5
Browse files Browse the repository at this point in the history
  • Loading branch information
Tadeusz Sośnierz committed May 5, 2012
1 parent 9b5ddfd commit 1b86a11
Showing 1 changed file with 10 additions and 11 deletions.
21 changes: 10 additions & 11 deletions bin/panda
Expand Up @@ -2,15 +2,6 @@
use Shell::Command;
use Panda;

sub installprojects($panda, @args) {
for @args -> $x {
try {
$panda.resolve($x);
CATCH { say $! }
};
}
}

sub listprojects($panda) {
for $panda.ecosystem.project-list -> $p {
my $x = $panda.ecosystem.get-project($p);
Expand Down Expand Up @@ -84,9 +75,17 @@ my $panda;
);
}

# allow switches after positionals
@*ARGS = @*ARGS.grep(/^ '-'/), @*ARGS.grep(/^ <-[-]>/);

#= Install the specified modules
multi MAIN ('install', *@modules) {
installprojects($panda, @modules);
multi MAIN ('install', *@modules, Bool :$notests, Bool :$nodeps) {
for @modules -> $x {
try {
$panda.resolve($x, :$notests, :$nodeps);
CATCH { say $! }
};
}
}

#= List all available modules
Expand Down

0 comments on commit 1b86a11

Please sign in to comment.