Prechádzať zdrojové kódy

Handle completely uninitialized repo descriptions better by explicitly converting undef to "" (avoids warnings about "Use of uninitialized value $currentText")

Tianon Gravi 9 rokov pred
rodič
commit
3bca1909de
1 zmenil súbory, kde vykonal 2 pridanie a 0 odobranie
  1. 2 0
      push.pl

+ 2 - 0
push.pl

@@ -118,6 +118,8 @@ while (my $repo = shift) { # '/library/hylang', '/tianon/perl', etc
 	warn 'failed to get: ' . $repoUrl and next unless $repoTx->success;
 	
 	my $repoDetails = $repoTx->res->json;
+	$repoDetails->{description} //= '';
+	$repoDetails->{full_description} //= '';
 	
 	my $hubShort = prompt_for_edit($repoDetails->{description}, $repoName . '/README-short.txt');
 	my $hubLong = prompt_for_edit($repoDetails->{full_description}, $repoName . '/README.md', $hubLengthLimit);