File tree Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -446,7 +446,8 @@ protected boolean hasSeenCode() {
446446 public int run () throws IOException {
447447 startThreadPool ();
448448 try {
449- extractSource ();
449+ CompletableFuture <?> sourceFuture = extractSource ();
450+ sourceFuture .join (); // wait for source extraction to complete
450451 if (hasSeenCode ()) { // don't bother with the externs if no code was seen
451452 extractExterns ();
452453 }
@@ -589,7 +590,7 @@ public FileType fileType(Path f) {
589590 }
590591
591592 /** Extract all supported candidate files that pass the filters. */
592- private void extractSource () throws IOException {
593+ private CompletableFuture <?> extractSource () throws IOException {
593594 // default extractor
594595 FileExtractor defaultExtractor =
595596 new FileExtractor (mkExtractorConfig (), outputConfig , trapCache );
@@ -636,7 +637,7 @@ private void extractSource() throws IOException {
636637 boolean hasTypeScriptFiles = extractedFiles .size () > 0 ;
637638
638639 // extract remaining files
639- extractFiles (
640+ return extractFiles (
640641 filesToExtract , extractedFiles , extractors ,
641642 f -> !(hasTypeScriptFiles && isFileDerivedFromTypeScriptFile (f , extractedFiles )));
642643 }
You can’t perform that action at this time.
0 commit comments