Skip to content

Commit

Permalink
critic fix
Browse files Browse the repository at this point in the history
  • Loading branch information
kiwiroy committed Nov 23, 2017
1 parent 6fed00b commit 831daf3
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions scripts/key-db
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ sub command_update {
$self->username($user) unless $self->username;
my $moved = $_->move_to($_->dirname->child($self->_generate_filename));
say "renamed: $_ to $moved" if "$_" ne "$moved";
[ $moved, SSH::PublicKey->new(val => $moved->slurp) ]
return [ $moved, SSH::PublicKey->new(val => $moved->slurp) ];
})
->each(
sub {
Expand Down Expand Up @@ -204,7 +204,7 @@ sub command_install {
$keys->each(
sub {
$installed++;
$mem->add_chunk($_->render)
$mem->add_chunk($_->render);
});
$mem->move_to($self->authorized_keys);

Expand Down Expand Up @@ -238,7 +238,7 @@ sub _fetch_by_public_key {
sub _fetch_by_user {
my ($self, $user) = @_;
return $self->key_files
->grep(sub { $_->basename =~ qr/^$user\./ })
->grep(sub { return $_->basename =~ qr/^$user\./; })
}

sub _filename_divide {
Expand Down

0 comments on commit 831daf3

Please sign in to comment.