7f4217b12c9e6a7185a37ebc4d43c40cab29b85c
hiram
  Fri Mar 20 13:41:16 2020 -0700
errro out when all files can not be found refs #24547

diff --git src/hg/utils/automation/doNcbiRefSeq.pl src/hg/utils/automation/doNcbiRefSeq.pl
index 52c8841..06758c7 100755
--- src/hg/utils/automation/doNcbiRefSeq.pl
+++ src/hg/utils/automation/doNcbiRefSeq.pl
@@ -145,31 +145,31 @@
 # * step: download [workhorse]
 sub doDownload {
   my $filesFound = 0;
  my @requiredFiles = qw( genomic.gff.gz rna.fna.gz rna.gbff.gz protein.faa.gz );
   my $filesExpected = scalar(@requiredFiles);
   foreach my $expectFile (@requiredFiles) {
     if ( -s "/hive/data/outside/ncbi/genomes/$ftpDir/${asmId}_${expectFile}" ) {
       ++$filesFound;
     } else {
       printf STDERR "# doNcbiRefSeq.pl: missing required file /hive/data/outside/ncbi/${asmId}_${expectFile}\n";
     }
   }
 
   if ($filesFound < $filesExpected) {
     printf STDERR "# doNcbiRefSeq.pl download: can not find all files required\n";
-    exit 0;
+    exit 255;
   }
   my $runDir = "$buildDir/download";
   &HgAutomate::mustMkdir($runDir);
 
   my $whatItDoes = "download required set of files from NCBI.";
   my $bossScript = newBash HgRemoteScript("$runDir/doDownload.bash", $workhorse,
 				      $runDir, $whatItDoes);
   my $outsideCopy = "/hive/data/outside/ncbi/genomes/$ftpDir";
   # might already have the NCBI 2bit file here:
   my $localData = $buildDir;
   $localData =~ s#trackData/ncbiRefSeq#download#;
   my $local2Bit = "$localData/$asmId.2bit";
 
   # establish variables
   $bossScript->add(<<_EOF_