Skip to content

Commit

Permalink
fixed pkg install/remove
Browse files Browse the repository at this point in the history
  • Loading branch information
Jan committed May 29, 2013
1 parent 6c810ec commit 2e4f285
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
3 changes: 3 additions & 0 deletions lib/Rex/Server/Helper/Rex.pm
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ use Rex -feature => '0.42';
use Rex::Transaction;
use Rex::Commands::Cron;
use Rex::Commands::Kernel;
use Data::Dumper;


my $cached_connections = {};
Expand Down Expand Up @@ -55,6 +56,8 @@ no strict 'refs';

$cached_connections->{$options->{server} . "-" . $options->{user}} = $conn;
}

print STDERR Dumper($options->{args});

return &$command(@{ $options->{args} });
}
Expand Down
4 changes: 2 additions & 2 deletions lib/Rex/Server/V1/Pkg.pm
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ sub install {
my $self = shift;
my $json = $self->req->json;

unshift @{ $json->{args} }, "package";
unshift @{ $json->{args} }, "package", $self->param("package");
my $ret = Rex::Server::Helper::Rex->run_command("install", $json);

return $self->render(json => {ok => Mojo::JSON->true, return => $ret});
Expand All @@ -22,7 +22,7 @@ sub remove {
my $self = shift;
my $json = $self->req->json;

unshift @{ $json->{args} }, "package";
unshift @{ $json->{args} }, "package", $self->param("package");
my $ret = Rex::Server::Helper::Rex->run_command("remove", $json);

return $self->render(json => {ok => Mojo::JSON->true, return => $ret});
Expand Down

0 comments on commit 2e4f285

Please sign in to comment.