Skip to content

Commit

Permalink
fixed a bug when there's no files in the repo
Browse files Browse the repository at this point in the history
Signed-off-by: Daisuke Murase <typester@gmail.com>
  • Loading branch information
miyagawa authored and typester committed Jun 13, 2009
1 parent 8511576 commit 04bcffe
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/Net/GitHub/Upload.pm
Expand Up @@ -86,7 +86,7 @@ sub upload {

# check duplicate filename
my ($already_uploaded)
= grep { $_->{name} eq $info->{name} } @{ $self->list_files( $info->{repos} ) };
= grep { $_->{name} eq $info->{name} } @{ $self->list_files( $info->{repos} ) || []};
if ($already_uploaded) {
die qq[file '$already_uploaded->{name}' is already uploaded. please try different name];
}
Expand Down

0 comments on commit 04bcffe

Please sign in to comment.